Thanks for the reply Steve.

I have the following in my MainActivity.java:

MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.mysound);
mediaPlayer.start();

But Studio doesn't like context for some reason (cannot resolve symbol).  I do 
have 
import android.media.MediaPlayer;



On Wednesday, November 30, 2016 at 6:10:31 PM UTC-6, Steve Gabrilowitz 
wrote:
>
> I suggest that you do a web search for "android life cycle".  The 
> information you find there will not only answer your question but provide 
> you with some basic knowledge that any android developer must know!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/4ac16e38-ab12-4899-8234-c3b2e00c9ee3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to