4phun / amproid

Amproid is an Ampache client for Android
GNU General Public License v3.0
9 stars 2 forks source link

Android Auto unable to launch media apps #1

Closed 4phun closed 4 years ago

4phun commented 4 years ago

See for exampe https://support.google.com/androidauto/thread/14721161 Check if some kind of workaround can be built in to the app

4phun commented 4 years ago
12:11:09.156 23258-23258/? D/GH.MediaModel: onMediaAppChanged(ComponentInfo{com.pppphun.amproid/com.pppphun.amproid.AmproidService})
12:11:09.156 23258-23258/? D/MediaBrowserCompat: Connecting to a MediaBrowserService.
12:11:09.158 23258-23258/? D/GH.UnCfbMediaNoDrawer: onMediaAppChanged from:null to:ComponentInfo{com.pppphun.amproid/com.pppphun.amproid.AmproidService}
12:11:09.159 23258-23258/? D/GH.UnCfbMediaNoDrawer: showLoadingView
12:11:09.159 23258-23258/? D/GH.UnCfbMediaNoDrawer: showNoContentView
12:11:09.160 23258-23258/? D/GH.UnCfbMediaNoDrawer: Hide drawer button
12:11:09.161 23258-23258/? D/GH.MediaModel: onMediaAppChanged(ComponentInfo{com.pppphun.amproid/com.pppphun.amproid.AmproidService})
12:11:09.161 23258-23258/? D/MediaBrowserCompat: Connecting to a MediaBrowserService.
12:11:09.163 23258-23258/? D/GH.MediaModel: unsubscribe mediaId=null
12:11:09.163 23258-23258/? E/GH.MediaModel: MediaBrowser is not connected while asking to unsubscribe. previous=null passed=null
12:11:09.164 23258-23258/? D/GH.VnClientService: New CarSystemUiCallback registered, count: 1
12:11:09.165 23258-23258/? D/GH.AvailableAppFinder: Available apps [ComponentInfo{com.google.android.apps.maps/com.google.android.maps.MapsActivity}]
12:11:09.165 23258-23258/? I/chatty: uid=10122 com.google.android.projection.gearhead:vanagon identical 1 line
12:11:09.166 23258-23258/? D/GH.AvailableAppFinder: Available apps [ComponentInfo{com.google.android.apps.maps/com.google.android.maps.MapsActivity}]
12:11:09.170 23258-23258/? D/GH.UnCfbMediaNoDrawer: showLoadingView
12:11:09.170 23258-23258/? D/GH.UnCfbMediaNoDrawer: showNoContentView
12:11:09.171 23258-23258/? D/GH.UnCfbMediaNoDrawer: Hide drawer button
12:11:09.171 23258-23314/? E/libc: Access denied finding property "ro.vendor.hwui.texture_cache_size"
12:11:09.171 23258-23314/? D/OpenGLRenderer: textureCacheSize 25165824
12:11:09.209 369-369/?     E/SPRDHWComposer: SPRD_SR SprdHWComposer2::GET_ACTIVE_CONFIG[460] *outConfig:0
12:11:09.209 23258-23258/? E/GH.PlayPauseImageView: Unknown PlaybackState: -1
12:11:09.210 23258-23258/? I/chatty: uid=10122 com.google.android.projection.gearhead:vanagon identical 4 lines
12:11:09.210 23258-23258/? E/GH.PlayPauseImageView: Unknown PlaybackState: -1
12:11:09.213 369-369/?     E/SPRDHWComposer: SPRD_SR SprdHWComposer2::GET_ACTIVE_CONFIG[460] *outConfig:0
12:11:09.219 369-369/?     E/SPRDHWComposer: SPRD_SR SprdHWComposer2::GET_ACTIVE_CONFIG[460] *outConfig:0
12:11:09.239 722-746/?     I/ActivityManager: Displayed com.google.android.projection.gearhead/com.google.android.gearhead.vanagon.media.VnMediaActivity: +352ms
12:11:09.240 722-851/?     W/ActivityManager: Unbind failed: could not find connection for android.os.BinderProxy@acde3a
12:11:09.240 23258-23258/? E/GH.MediaModel: Media browser service connection FAILED!
12:11:09.241 23258-23258/? D/GH.UnCfbMediaNoDrawer: showPlaybackErrorView Amproid doesn't seem to be working right now.
12:11:09.242 23258-23258/? D/GH.UnCfbMediaNoDrawer: Hide drawer button for unsupported app.
4phun commented 4 years ago

Added a persistent notification that prelaunches the media browser service as soon as Android enters Auto mode. This seem to fix the problem, though the notification might be annoying to some users. It can be turned off in the menu.

In conjunction with this, also made the media browser service NOT starting to play immediately when in Auto mode (user has to click the play button explicitly). Not only this was needed to avoid confusing the user, but it's also a requirement for supporting Android Auto.