• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Open Android's default Music App from own Application

Hi Friends,

I want to open Android's default music app from our own app. I am able to find
Code:
Intent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
startActivity(intent);

from google. But this is supported for level 8 and up.

Is there any other way to open music app.

I can not ignore Android 2.1 version.

Please Help
 
I'm not sure of a way to open the default music app, but the following code will give you the list of apps available to play audio files:

Code:
	Intent intentToPlay = new Intent(Intent.ACTION_VIEW);
	Uri uri = Uri.parse("your_file");
	intentToPlay.setDataAndType(uri, "audio/*");
	startActivity(intentToPlay);
 
Back
Top Bottom