I got it working now, just to let you know why it wasnt working:
I changed this:
public class BackgroundService extends Service{
@Override
public IBinder onBind(Intent intent) {
Type: Posts; User: TP-Oreilly
I got it working now, just to let you know why it wasnt working:
I changed this:
public class BackgroundService extends Service{
@Override
public IBinder onBind(Intent intent) {
Ive created a service which plays the audio, but still when i change the layout on the activity the audio stops?
I cant because I have set it so that when I click on a button the this is called: setContentView(R.layout.menu_screen);
I tried making a different activity for the menu_screen.xml layout but when...
Hi,
Why does my MediaPlayer stop when I change the layout?
MediaPlayer mp = MediaPlayer.create(this, R.raw.background_song);
mp.setLooping(true);
mp.start();