WIP for android auto
This commit is contained in:
parent
3858d65a57
commit
103cbf2270
4 changed files with 69 additions and 14 deletions
|
@ -131,8 +131,8 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
|||
val uri = intent.data
|
||||
val mimeType = intent.type
|
||||
var handled = false
|
||||
|
||||
if (intent.action != null && intent.action == MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH) {
|
||||
println("uri -> $uri")
|
||||
/*if (intent.action != null && intent.action == MediaStore.INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH) {
|
||||
val songs = SearchQueryHelper.getSongs(this, intent.extras!!)
|
||||
if (MusicPlayerRemote.shuffleMode == MusicService.SHUFFLE_MODE_SHUFFLE) {
|
||||
MusicPlayerRemote.openAndShuffleQueue(songs, true)
|
||||
|
@ -140,7 +140,7 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
|
|||
MusicPlayerRemote.openQueue(songs, 0, true)
|
||||
}
|
||||
handled = true
|
||||
}
|
||||
}*/
|
||||
|
||||
if (uri != null && uri.toString().isNotEmpty()) {
|
||||
MusicPlayerRemote.playFromUri(uri)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue