Answer the question
In order to leave comments, you need to log in
How to play background music on an android tablet?
Greetings!
Flash is not an option.
JavaScript doesn't want to play, and neither does HTML5 set to autoplay.
Is there an alternative?
Answer the question
In order to leave comments, you need to log in
public class Serve extends Service{
MediaPlayer mp;
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return null;
}
public void onCreate()
{
mp = MediaPlayer.create(this, R.raw.b);
mp.setLooping(false);
}
public void onDestroy()
{
mp.stop();
}
public void onStart(Intent intent,int startid){
Log.d(tag, "On start");
mp.start();
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question