How to Play a Sound File Using the MediaPlayer Class – Android Studio Tutorial
In this video we will take a look at a simple MediaPlayer example. We will play a local sound file from our raw folder and we will be able to pause, resume and stop the music. When we stop our MediaPlayer, we will immediately release it to free up system resources.
Check out the SoundPool video:
Source code:
https://gist.github.com/codinginflow/45067b7633ce4fe972196b40e5541c5f
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
https://www.youtube.com/c/codinginflo…
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
https://discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: https://www.facebook.com/codinginflow
Instagram: https://www.instagram.com/codinginflow
TikTok: https://www.tiktok.com/@codinginflow
Twitter: https://twitter.com/codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Views :145308
android studio