I have two buttons and audio listview, for the first button i use LongClick and startActivityForResult method to get string from another activity for MediaPlayer. But I want to use second button too. I need to use startActivityForResult to get another string for another MediaPlayer, Here is my code: 

```
public class MainActivity extends Activity {
String setData, gotArnswer,s,s1;
MediaPlayer mMediaPlayer;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mMediaPlayer = new MediaPlayer();
        Button b1 =(Button) findViewById(R.id.button1);
        Button b2 =(Button) findViewById(R.id.button2);
        b2.setOnLongClickListener(new View.OnLongClickListener() {

            public boolean onLongClick(View arg0) {
                // TODO Auto-generated method stub

                return false;
            }
        });
        b1.setOnClickListener(new View.OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub
                try {
                    if (mMediaPlayer.isPlaying()) {
                          mMediaPlayer.reset();
                 }
                  mMediaPlayer.setDataSource(s); //using string here
                  mMediaPlayer.prepare();
                 mMediaPlayer.start();
            } catch (Exception e) {

            }
            }
        });
        b1.setOnLongClickListener(new View.OnLongClickListener() {

            public boolean onLongClick(View v) {
                // TODO Auto-generated method stub
                Intent i = new Intent(MainActivity.this, Activityone.class);
                startActivityForResult(i, 0);
                return false;

            }
        });

    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        // TODO Auto-generated method stub
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK){
            Bundle basket = data.getExtras();
             s = basket.getString("arnswer");

        }
    }

```

And my ListView `onClick()`:

```
public void onItemClick(AdapterView parent, View v, int position,
                        long id) {
  System.gc();
  music_column_index = musiccursor
    .getColumnIndexOrThrow(MediaStore.Audio.Media.DATA);
  musiccursor.moveToPosition(position);
  String filename = musiccursor.getString(music_column_index);
  Intent person = new Intent();
  Bundle backpack = new Bundle();
  backpack.putString("arnswer", filename);
  person.putExtras(backpack);
  setResult(RESULT_OK, person);
  finish();
}

};

```