Search:

Type: Posts; User: TP-Oreilly

Search: Search took 0.09 seconds.

  1. Replies
    4
    Views
    2,028

    Re: MediaPlayer.

    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) {
  2. Replies
    4
    Views
    2,028

    Re: MediaPlayer.

    Ive created a service which plays the audio, but still when i change the layout on the activity the audio stops?
  3. Replies
    4
    Views
    2,028

    Re: MediaPlayer.

    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...
  4. Replies
    4
    Views
    2,028

    MediaPlayer.

    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();
Results 1 to 4 of 4