Hello,

Thanks in advance for the help. I'm both new and trying to launch the
native music player from my application. I've searched and read all
over the mailing list (and web) for help with this. The best I've
managed is to launch the music player to show a list of songs (that
the selection can only be played once without a background service to
keep running):

/*
This opens up to view all the files, but only plays one at a time,
without playlists or continuing to next track
*/
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("audio/*");
startActivity(intent);


/* The other option I got working is to specifically call the music
player to play one track.
   although this doesn't seem to work well with the emulator, it does
if you have another media player installed with an actual phone
 */
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
"audio/*");
startActivity(intent);


What I would like to do is just start the media player with no data to
send it. Ideally just have it bring the user to the normal main
screen, just like you clicked the music icon to start the app.


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

Reply via email to