mediabrowser

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