Is it possible to open the music app from my app in android, or is it best to write a whole new music app inside of mine. I would rather use theirs since the user will already be comfortable with it.
Any idea on how I can send the user of my app to the droid app? My app is not a music app but I want them to be able to go to the music app easily.
dweebsonduty
2010-06-24 22:52:57
+1
A:
Is it possible to open the music app from my app in android
Yes and no.
Yes, it is possible to write code to do this.
No, the Intents
you would need to use are undocumented and may change in future Android releases. The Music app is just another app; it is not part of the Android SDK's public API.
CommonsWare
2010-06-25 00:41:08
A:
I found one way to do this.
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
File file = new File(YOUR_SONG_URI);
intent.setDataAndType(Uri.fromFile(file), "audio/*");
startActivity(intent);
dweebsonduty
2010-07-29 21:48:50