And in which of the lifecycle methods did you place this code? On Dec 1, 2016 9:38 AM, "chicago chuck" <[email protected]> wrote:
> 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 [email protected]. > To post to this group, send email to [email protected]. > 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 > <https://groups.google.com/d/msgid/android-developers/4ac16e38-ab12-4899-8234-c3b2e00c9ee3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CABfabRhMdPwSsdyqC1C9Qk0hoEKZxoDtdfTo66xG%2B8bq84u2XA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

