title: Implement Now Playing in Music Player
body: <p>I am trying to make a music player in android. I have two activities. 
  MainActivity: updates the list of songs and displays them. 
  PlaySongActivity: implements the basic features: play, pause, next, previous. </p>
  
  <p>Now, I wish to switch between the two activities. When I press back button from the PlaySongActivity, I get back to the MainActivity. But I dont know what to do when I press the NowPlaying button.
  Here's what I am doing. </p>
  
  <p>MainActivity.java</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      updatePlayList();
  
      Button nowPlayingBtn = (Button) findViewById(R.id.nowPlayingBtn);
      nowPlayingBtn.setOnClickListener(new Button.OnClickListener() {
          @Override
          public void onClick(View v) {
              intent = new Intent(MainActivity.this, PlaySongActivity.class);
              startActivity(intent);
          }
      });
  }
  
  @Override
  protected void onListItemClick(ListView list, View v, int position, long id) {
      intent = new Intent(MainActivity.this, PlaySongActivity.class);
      intent.putExtra("position",position);
      intent.putExtra("songsList", songs);
      startActivity(intent);  
  }
  </code></pre>