mediabrowserservicecompat

Android: NotificationCompat.MediaStyle action buttons don't do anything

可紊 提交于 2021-01-27 18:20:48
问题 I've got a simple Android app containing one Activity and a Service that derives from MediaBrowserServiceCompat . I've successfully gotten it set up to play audio from my main activity by using MediaBrowserCompat and MediaControllerCompat . It can even play and pause the audio from my Bluetooth headphones. All good. My challenge concerns the NotificationCompat.MediaStyle notification that appears on the lock screen and in the notifications tray. The notification appears properly. However,

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="

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(

Unable to connect MediaBrowserCompat

﹥>﹥吖頭↗ 提交于 2019-12-11 04:26:13
问题 I followed the Android official documentation on connecting MediaBrowserCompat but it's refused to connect, as a matter of fact neither onConnected() , onConnectionSuspended() or onConnectionFailed() is called. I have also tried this answer but it didn't work. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_audio_player); ButterKnife.bind(this); setSupportActionBar(toolbar); getSupportActionBar()

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