i have develope apps in which i play background music.but when i go to
the home through back tab then the song is also playing.how it is
stop.. my code are
package com.riushabh;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class west extends Activity implements OnClickListener {
        Button bt;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        bt=(Button)findViewById(R.id.button1);
        bt.setOnClickListener(this);
        MediaPlayer mp=MediaPlayer.create(this, R.raw.ri);
        mp.start();
    }
        @Override
        public void onClick(View v) {
                Intent i =new Intent(this,subh.class);
                startActivity(i);
                // TODO Auto-generated method stub

        }
}

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

Reply via email to