title: How to pickup an audio file's path or uri from device in Android?
body: <p>I am creating an simple app where I want to play a sound. On pressing a button play on app it will play the sound.
  For playing sound I am using:</p>
  
  <pre><code>MediaPlayer mediaPlayer;
          mediaPlayer = MediaPlayer.create(this, R.raw.test_cbr);
          mediaPlayer.setOnCompletionListener(new OnCompletionListener()
          {
              @Override
              public void onCompletion(MediaPlayer mp)
              {
                  // TODO Auto-generated method stub
                  Toast.makeText(getApplicationContext(), "Completed",
                     Toast.LENGTH_LONG).show();
  
              }
          });
  mediaPlayer.start();
  </code></pre>
  
  <p>And it works fine.</p>
  
  <p>But now I want that the user should be able to select a audio file from device, so that when he or she presses the play button, the selected sound should be played.</p>
  
  <p>I am not getting any intent action like image can be picked.</p>
  
  <pre><code>Intent photo_picker_intent = new Intent(Intent.ACTION_PICK);
  photo_picker_intent.setType("image/*");
  startActivityForResult(photo_picker_intent, PHOTOS_FROM_GALLERY);
  </code></pre>
  
  <p>In the above code, the user will simply go to gallery.  Upon clicking on any image, he or she will get an image URI that can be used for showing image in app.  I would like to do the same, except for an audio file selection.</p>