mediabrowserservice

Android assistant - MediaBrowserService - Voice command - “Play x on appName”

…衆ロ難τιáo~ 提交于 2020-07-30 01:53:08
问题 The voice commande Play [song] on [my appName] command not working, the "appName" is not being recognised by google assistante. I followed the instruction form https://developer.android.com/guide/topics/media-apps/interacting-with-assistant and the demo app form https://github.com/android/uamp My AndroidManifest: <application android:name=".XApplication" android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" // app_name = appX 101.1 android:roundIcon="

Android assistant - MediaBrowserService - Voice command - “Play x on appName”

天涯浪子 提交于 2020-07-30 01:52:57
问题 The voice commande Play [song] on [my appName] command not working, the "appName" is not being recognised by google assistante. I followed the instruction form https://developer.android.com/guide/topics/media-apps/interacting-with-assistant and the demo app form https://github.com/android/uamp My AndroidManifest: <application android:name=".XApplication" android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" // app_name = appX 101.1 android:roundIcon="

MediaStyleNotification: Play/Pause button does not respond to click

一笑奈何 提交于 2019-12-25 02:22:16
问题 In my app when the user chooses an audio file for playing, when the file is ready and the playback starts a MediaStyle Notification is shown successfully. The metadata info is updated, title, icon etc. But… 1.Play/Pause button does not respond to clicks. 2.Clicking the notification does not open the activity. 3.Swipe gesture triggers also… nothing I don’t know what I am missing. You can have a look at my MediaBrowserService class. 回答1: The code being discussed: private void

How to set EXTRA_PAGE and EXTRA_PAGE_SIZE in a MediaBrowserServiceCompat by getting reference to the Android Auto MediaBrowser?

半腔热情 提交于 2019-12-21 03:50:45
问题 I have an Android Auto app. I would like to take advantage of pagination for browsing within the app. It seems that you can set EXTRA_PAGE and EXTRA_PAGE_SIZE by getting a reference to the MediaBrowserCompat and passing those constants in .subscribe(). However, I can't figure out how to get a reference to the MediaBrowserCompat that Android Auto Audio uses in order to call .subscribe(). This seems way too complicated for something that should be simple, am I just overthinking things? 回答1: How

MediaBrowserCompat.connect() never calls onConnected or any MediaBrowserCompat.ConnectionCallback method

旧街凉风 提交于 2019-12-14 02:02:26
问题 I am trying to connect my activity to a MediaBrowserServiceCompat service using MediaBrowserCompat . This is my activity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bush_did_nine_eleven); Log.d("activity", " onCreate"); mediaBrowser = new MediaBrowserCompat(this, new ComponentName(this, MusicServiceMediaBrowser.class), new MediaBrowserCompat.ConnectionCallback() { @Override public void onConnected() { Log.d(

How to set EXTRA_PAGE and EXTRA_PAGE_SIZE in a MediaBrowserServiceCompat by getting reference to the Android Auto MediaBrowser?

一笑奈何 提交于 2019-12-03 11:44:33
I have an Android Auto app. I would like to take advantage of pagination for browsing within the app. It seems that you can set EXTRA_PAGE and EXTRA_PAGE_SIZE by getting a reference to the MediaBrowserCompat and passing those constants in .subscribe(). However, I can't figure out how to get a reference to the MediaBrowserCompat that Android Auto Audio uses in order to call .subscribe(). This seems way too complicated for something that should be simple, am I just overthinking things? How to get the reference to the Android Auto MediaBrowser? For it, you suppose to know the package name and the