How To Get Spotify And Other Android Music Apps To Search And Play From An Intent?
I would like to create a MEDIA_PLAY_FROM_SEARCH (or other) intent that will search for and play a song in any major Android music app. I expected the following command line to work
Solution 1:
I suspect that it is due to how the specific Apps are handling the focus. Could you try the following?
adb shell am start -a "android.media.action.MEDIA_PLAY_FROM_SEARCH" -e android.intent.extra.focus "vnd.android.cursor.item/playlist" -e query "yellow\ submarine\ by\ the\ beatles" -f 268435456
and if that is unsuccessful...
adb shell am start -a "android.media.action.MEDIA_PLAY_FROM_SEARCH" -e android.intent.extra.focus "vnd.android.cursor.item/audio" -e query "yellow\ submarine\ by\ the\ beatles" -f 268435456
Using "vnd.android.cursor.item/*" should play some music based on a smart choice, but it is unstructured and Apps should use more specific search modes when possible, e.g. playlist/audio
Post a Comment for "How To Get Spotify And Other Android Music Apps To Search And Play From An Intent?"