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
5h 24m
Duration
33,865
Views
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 My Free Month

Start your free month on LinkedIn Learning, which now features 100% of Lynda.com courses. Develop in-demand skills with access to thousands of expert-led courses on business, tech and creative topics.

Start My Free Month

You are now leaving Lynda.com and will be automatically redirected to LinkedIn Learning to start your free trial.