title: Android open default mp3 player within application
body: <p>Should be really simple.  I just want the default mp3 player to open when a button is pressed as its own activity.  I need it to work on api 3 and higher</p>
  
  <p>This opens a media player but it is not the default:</p>
  
  <pre><code>//doesnt open default player
  Intent viewMediaIntent = new Intent();   
  viewMediaIntent.setAction(android.content.Intent.ACTION_VIEW);   
  //File file = new File(objectFilePath);   
  viewMediaIntent.setDataAndType(null, "audio/*");   
  viewMediaIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  act.startActivity(viewMediaIntent);  
  </code></pre>
  
  <p>this doesn't work:(no activity found to handle intent)</p>
  
  <pre><code>Intent intent = new Intent("android.intent.action.MUSIC_PLAYER"); 
  act.startActivity(intent);
  </code></pre>
  
  <p>This also works but not for default:</p>
  
  <pre><code>Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1"); 
  Intent it = new Intent(Intent.ACTION_VIEW, uri);   
  act.startActivity(it); 
  </code></pre>
  
  <p>thank you for your time.</p>