Monday, April 30, 2012

Re: [android-developers] public variables

ok..i have other question...i make code

if (AppSettings.playSounds)
{
play.mp.start();   //////////play is a  another class which i what to start music what i input in play-class
}



import android.app.Activity;
import android.content.Context;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;

public class play extends Activity{
   
    public static Context context;
    public static MediaPlayer mp=MediaPlayer.create(context, R.drawable.klik);

}


and shows an error..I can not recognize errorfrom logcat...What iam doing wrong?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment