Android Code Snippet Intent: search and play song

With this intent, you can directly search and play any song from your device. No need to search for music files or requesting extra permissions.
Get more info here: https://developer.android.com/guide/components/intents-common.html#Music

B4X:
    Dim inmusic As Intent
    dim strsearch="Linkin Park" as string    'Name of the song you wanna play
    inmusic.Initialize("android.media.action.MEDIA_PLAY_FROM_SEARCH", "")
    inmusic.Action="android.media.action.MEDIA_PLAY_FROM_SEARCH"
    inmusic.PutExtra("query", strsearch)
    StartActivity(inmusic)
 
Top