Skip navigation

Play an audio file from assets

Play an audio file from assets: Android Development Tips Weekly
Play an audio file from assets: Android Development Tips Weekly

The Android SDK’s MediaPlayer component can be used to play both audio and video content. It can play from a web-based resource with a URL, but can also be used to play local files stored on the device. When you package an app and want to include an audio file, one of the most common places to store it is in the assets directory. This directory contains files your app needs, but unlike resources these files aren’t associated with a resource id. Instead, you refer to them by name using the current context and a reference to the app package’s assets.

Resume Transcript Auto-Scroll
Skill Level Intermediate
3h 50m
Show More Show Less

Q: Why can't I earn a Certificate of Completion for this course?

A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.

Skills covered in this course
Developer Mobile Apps Android

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start Your Free Trial Now

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now