I am trying to launch the MediaPlayer from a service, and its not wroking as expected. I m getting the following exception,
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.MUSIC_PLAYER flg=0x10000000 }
Please find the snippet of code that gets invoked in the service,
Intent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Android Manifest
<service android:name="com.lakshmi.shakenfun.AlertService" >
<intent-filter >
<action android:name="android.intent.action.MUSIC_PLAYER" />
</intent-filter>
</service>
Please do let me know, where I am doing wrong.
My target platform is 8
Thanks, Ramesh