I have a Galaxy S5 with Android version 6.0.1 Power saving mode is "off" and ultra power saving mode is "off"
I've tried three Internet music streaming apps namely: Pandora, SiriusXM and WDET Radio.
In each case music/audio material plays for awhile (approximately a few minutes) and then the audio turns off with the app at "pause" (play button appears and audio will continue when play button is pressed). This can occur anytime, in other words it doesn't occur just at the end of an audio track.
I've searched on this topic and the only suggestion I could find was to make sure the power savings mode were set to off. I do not have the source code to these apps so I can only log what is enabled by the app.
I captured some logcat traces while filtering on "aud". I had tried various filters (and also no filtering) but I couldn't see a pattern until I filtered on "aud".
I have pasted in a segment of the logcat showing the startup of Pandora which ran from 21:33:53 to 21:39 when the app was closed by me. The entry at:
12-29 21:38:03.712 767-1806/? W/MediaFocusControl: AudioFocus audio focus client died
indicates when muted audio was detected (by listening to it). There was no user intervention to cause this. The logcat entry follows:
12-29 21:33:53.332 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:53.332 767-1713/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:53.572 767-1709/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:54.282 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.272 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.282 767-2423/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.862 767-1807/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-1709/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-1579/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:55.872 767-786/? D/AudioService: getStreamVolume 3 index 0
12-29 21:33:56.212 6009-6177/? W/AudioCapabilities: Unsupported mime audio/mpeg-L1
12-29 21:33:56.212 6009-6177/? W/AudioCapabilities: Unsupported mime audio/mpeg-L2
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/x-ms-wma
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/x-ima
12-29 21:33:56.222 6009-6177/? W/AudioCapabilities: Unsupported mime audio/evrc
12-29 21:33:56.232 6009-6177/? W/AudioCapabilities: Unsupported mime audio/qcelp
12-29 21:33:56.242 6009-6177/? W/AudioCapabilities: Unsupported mime audio/amr-wb-plus
12-29 21:33:56.252 6009-6177/? W/AudioCapabilities: Unsupported mime audio/qcelp
12-29 21:33:56.252 6009-6177/? W/AudioCapabilities: Unsupported mime audio/evrc
12-29 21:33:56.472 338-338/? E/OMXNodeInstance: setParameter(8e:SEC.aac.dec, ParamAudioAndroidAacPresentation(0x6f400003)) ERROR: UnsupportedIndex(0x8000101a)
12-29 21:33:56.492 338-6215/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:33:56.582 338-6215/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:33:56.912 338-29996/? W/AudioPolicyIntefaceImpl: Skipped to add effects on session 113
12-29 21:33:56.912 338-29996/? I/APM::AudioPolicyManager: startOutput() output 2, stream 3, session 113
12-29 21:33:56.922 338-945/? D/audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
12-29 21:33:56.922 338-945/? D/audio_hw_hfp: audio_extn_hfp_set_parameters: enter
12-29 21:33:56.922 338-945/? V/audio_hw_primary: out_set_parameters: exit: code(0)
12-29 21:33:56.922 338-945/? D/AudioFlinger: setCurDevice() 0x2
12-29 21:33:56.932 338-945/? I/AudioMixer: create resampler src 44100, 2, dst 48000, 2
12-29 21:33:56.932 338-945/? V/audio_hw_primary: start_output_stream: enter: usecase(0: deep-buffer-playback) devices(0x2)
12-29 21:33:56.932 338-945/? V/audio_hw_primary: select_devices: ENTER
12-29 21:33:56.932 338-945/? V/audio_hw_primary: select_devices: usecase(normal)
12-29 21:33:56.942 338-945/? V/audio_hw_primary: select_devices: usecase(PCM_PLAYBACK)
12-29 21:33:56.942 338-945/? D/audio_hw_primary: select_devices: out_snd_device(2: speaker)
12-29 21:33:56.942 338-945/? D/audio_hw_primary: select_devices: in_snd_device(0: dummy)
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 15, path = 0
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audtable
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
[ 12-29 21:33:56.942 338: 945 D/ ]
ACDBFILE_MGR:Read the devices count as zero, please check the acdb file
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> send_audvoltable
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
12-29 21:33:56.942 338-945/? D/ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_snd_device: snd_device(2: speaker, speaker)
12-29 21:33:56.942 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: SPK DRV Volume
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 8
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: RX7 Digital Volume
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 79
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: COMP0 Switch
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: RX7 MIX1 INP1, value: 5
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: DAC1 Switch
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.942 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_audio_route: enter: usecase(0)
12-29 21:33:56.942 338-945/? V/audio_hw_primary: enable_audio_route: apply mixer path: deep-buffer-playback
12-29 21:33:56.942 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1
12-29 21:33:56.942 338-945/? D/audio_route: Setting mixer control: value: 1
12-29 21:33:56.952 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:33:56.952 338-945/? V/audio_hw_primary: enable_audio_route: exit
12-29 21:33:56.952 338-945/? V/audio_hw_primary: start_output_stream: Opening PCM device card_id(0) device_id(0)
12-29 21:33:56.952 338-945/? V/audio_hw_primary: start_output_stream: exit
12-29 21:33:56.992 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 54(effect 0)
12-29 21:33:57.062 767-1435/? I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376 req=1flags=0x0
12-29 21:33:57.152 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(120)
12-29 21:34:09.232 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:09.242 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 1
12-29 21:34:09.252 767-1713/? D/AudioService: getStreamVolume 3 index 10
12-29 21:34:09.252 767-2420/? D/AudioService: getStreamVolume 3 index 10
12-29 21:34:09.682 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:09.692 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 2
12-29 21:34:09.702 767-1807/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:09.712 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 2
12-29 21:34:09.732 767-1806/? D/AudioService: active stream is 0x8
12-29 21:34:09.732 767-1726/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:09.742 767-1294/? D/AudioService: getStreamVolume 3 index 20
12-29 21:34:10.102 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:10.112 767-1435/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.112 767-787/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.112 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 3
12-29 21:34:10.192 767-786/? D/AudioService: getStreamVolume 3 index 30
12-29 21:34:10.352 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 3
12-29 21:34:10.362 767-2424/? D/AudioService: active stream is 0x8
12-29 21:34:10.712 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:10.722 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:34:10.732 767-1711/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:10.732 767-1726/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:10.882 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:34:10.902 767-2424/? D/AudioService: active stream is 0x8
12-29 21:34:11.242 767-1806/? D/AudioService: getStreamVolume 3 index 40
12-29 21:34:11.602 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:34:11.612 767-787/? D/AudioService: getStreamVolume 3 index 50
12-29 21:34:11.622 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 5
12-29 21:34:11.622 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:34:11.792 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 5
12-29 21:34:11.812 767-2423/? D/AudioService: active stream is 0x8
12-29 21:34:12.142 767-1709/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:31.632 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:36.822 767-1711/? D/AudioService: getStreamVolume 3 index 50
12-29 21:35:57.142 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(1)
12-29 21:36:17.112 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:17.142 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:36:17.142 767-1712/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:17.152 767-1806/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:17.162 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:36:17.172 767-1712/? D/AudioService: active stream is 0x8
12-29 21:36:17.592 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:17.602 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 3
12-29 21:36:17.622 767-787/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:17.642 767-2423/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:17.652 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 3
12-29 21:36:17.662 767-2424/? D/AudioService: active stream is 0x8
12-29 21:36:17.662 767-1294/? D/AudioService: getStreamVolume 3 index 30
12-29 21:36:19.392 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:19.392 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 4
12-29 21:36:19.412 767-1579/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:19.412 767-1711/? D/AudioService: getStreamVolume 3 index 40
12-29 21:36:19.612 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 4
12-29 21:36:19.622 767-1807/? D/AudioService: active stream is 0x8
12-29 21:36:19.902 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4113, lastAudibleStreamVolume = 5
12-29 21:36:19.912 767-1314/? I/AudioService: isMediaSilentMode false
12-29 21:36:19.932 767-1579/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:19.942 767-787/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:19.962 767-1435/? D/AudioService: getStreamVolume 3 index 50
12-29 21:36:20.142 1355-1481/? D/vol.VolumeDialogControl: onVolumeChangedW stream = 3, flags = 4112, lastAudibleStreamVolume = 5
12-29 21:36:20.162 767-1435/? D/AudioService: active stream is 0x8
12-29 21:36:27.352 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(1)
12-29 21:36:45.422 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 32(effect 2)
12-29 21:36:45.452 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(5)
12-29 21:37:11.412 338-29996/? E/OMXNodeInstance: setParameter(91:SEC.aac.dec, ParamAudioAndroidAacPresentation(0x6f400003)) ERROR: UnsupportedIndex(0x8000101a)
12-29 21:37:11.432 338-7398/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:37:11.462 338-7398/? I/SEC_AAC_DEC: AudioSpecificConfig 0x 13 90
12-29 21:37:40.682 338-923/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 113
12-29 21:37:41.042 767-2420/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-1786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-1806/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-2423/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.322 767-786/? D/AudioService: getStreamVolume 3 index 50
12-29 21:37:41.612 338-338/? W/AudioPolicyIntefaceImpl: Skipped to add effects on session 114
12-29 21:37:41.612 338-338/? I/APM::AudioPolicyManager: startOutput() output 2, stream 3, session 114
12-29 21:37:41.622 338-945/? D/audio_hw_primary: out_set_parameters: enter: usecase(0: deep-buffer-playback) kvpairs: routing=2
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: ENTER
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: usecase(normal)
12-29 21:37:41.622 338-945/? V/audio_hw_primary: select_devices: usecase(PCM_PLAYBACK)
12-29 21:37:41.622 338-945/? D/audio_hw_hfp: audio_extn_hfp_set_parameters: enter
12-29 21:37:41.622 338-945/? V/audio_hw_primary: out_set_parameters: exit: code(0)
12-29 21:37:41.622 338-945/? D/AudioFlinger: setCurDevice() 0x2
12-29 21:37:41.622 767-1294/? I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376 req=1flags=0x0
12-29 21:37:41.632 338-945/? I/AudioMixer: create resampler src 44100, 2, dst 48000, 2
12-29 21:38:00.032 338-945/? D/AudioFlinger: mixer(0xb01c0000) Spend too much time to write: delta 45(effect 2)
12-29 21:38:00.092 338-945/? D/AudioFlinger: mixer(0xb01c0000) throttle end: throttle time(19)
12-29 21:38:03.712 767-1806/? W/MediaFocusControl: AudioFocus audio focus client died
12-29 21:38:03.712 767-1806/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.os.BinderProxy@bb512aa
12-29 21:38:04.932 767-2424/? I/MediaFocusControl: AudioFocus requestAudioFocus() from android.media.AudioManager$3900a0 req=1flags=0x0
12-29 21:38:04.942 6009-6009/? D/AudioManager: AudioManager dispatching onAudioFocusChange(-1) for android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.142 767-1806/? I/MediaFocusControl: AudioFocus abandonAudioFocus() from android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.152 767-1806/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.media.AudioManager$c4c6611com.pandora.radio.player.w$1$5c6d376
12-29 21:38:05.482 338-923/? I/APM::AudioPolicyManager: stopOutput() output 2, stream 3, session 114
12-29 21:38:08.392 338-945/? V/audio_hw_primary: out_standby: enter: usecase(0: deep-buffer-playback)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: stop_output_stream: enter: usecase(0: deep-buffer-playback)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: disable_audio_route: enter: usecase(0)
12-29 21:38:08.572 338-945/? V/audio_hw_primary: disable_audio_route: reset mixer path: deep-buffer-playback
12-29 21:38:08.572 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:38:08.572 338-945/? D/audio_route: Setting mixer control: SLIMBUS_0_RX Audio Mixer MultiMedia1
12-29 21:38:08.572 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:38:08.582 338-945/? V/audio_hw_primary: disable_audio_route: exit
12-29 21:38:08.582 338-945/? V/audio_hw_primary: disable_snd_device: snd_device(2: speaker)
12-29 21:38:08.582 338-945/? D/audio_route: ++++ audio_route_update_mixer ==============
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: SPK DRV Volume
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: RX7 Digital Volume
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: COMP0 Switch
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: RX7 MIX1 INP1, value: 0
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: DAC1 Switch
12-29 21:38:08.582 338-945/? D/audio_route: Setting mixer control: value: 0
12-29 21:38:08.592 338-945/? D/audio_route: ------ audio_route_update_mixer ==============
12-29 21:38:08.592 338-945/? V/audio_hw_primary: stop_output_stream: exit: status(0)
12-29 21:38:08.592 338-945/? V/audio_hw_primary: out_standby: exit
12-29 21:39:41.392 767-786/? W/MediaFocusControl: AudioFocus audio focus client died
12-29 21:39:41.392 767-786/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.os.BinderProxy@b2a247a
12-29 21:39:41.402 767-2424/? D/AudioService: getStreamVolume 3 index 50
12-29 21:39:41.402 767-1807/? D/AudioService: getStreamVolume 3 index 50
The second instance of audio focus client died occurred at:
12-29 21:39:41.392 767-786/? W/MediaFocusControl: AudioFocus audio focus client died
This occurred after I hit the back button and then closed the app from the media notification.
Both the SiriusXM and WDET Radio app gave similar behavior insofar as the "audio focus client died" and muting behavior is concerned. I am an end user of these apps but since they all behave in a similar manner I am thinking it must have something to do with my device's configuration. This occurs whether I have Wifi or LTE as my data link. Furthermore the same end behavior occurs (loss of audio when it goes to "pause") whether I have either logging enabled through USB or no USB connection.
I haven't noticed this behavior in the past but I can't really say at what point it started to occur.
What can cause audio to unilaterally mute like this?
Is there some setting on my Android that can cause this?
Is there more information I can provide to help resolve this?
Thanks much. Jim
New Information: I ran some more tests and found the following logcat patterns (four out of four test results) when the audio focus client was declared dead:
Test 1:
12-30 16:14:05.545 809-911/? I/ActivityManager: Killing 13320:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 603s, lastActivityTime 603s
12-30 16:14:05.575 809-911/? V/BroadcastQueue: [background] Process cur broadcast BroadcastRecord{c9a7ef2 u0 null qIdx=4}, state= (APP_RECEIVE) DELIVERED for app ProcessRecord{5a54404 2277:com.google.android.gms.persistent/u0a14}
12-30 16:14:05.595 809-2443/? W/MediaFocusControl: AudioFocus audio focus client died
Test2:
12-30 16:39:59.942 809-832/? I/ActivityManager: Killing 17082:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 600s, lastActivityTime 600s
12-30 16:39:59.972 809-1751/? W/MediaFocusControl: AudioFocus audio focus client died
Test3:
12-30 16:50:13.251 809-1741/? I/ActivityManager: Killing 19652:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 612s, lastActivityTime 612s
12-30 16:50:13.291 809-1751/? W/MediaFocusControl: AudioFocus audio focus client died
Test4:
12-30 17:10:18.691 809-1747/? I/ActivityManager: Killing 26325:com.bmwgroup.connected.bmw.usa/u0a303 (adj 8): SSR - service for lastStateTime 603s, lastActivityTime 603s
12-30 17:10:18.731 809-1502/? W/MediaFocusControl: AudioFocus audio focus client died
In each case the audio stopped at essentially the same time as the ActivityManager was killing the Connected BMW app.
Does this mean the BMW Connected app has the audio focus even though it is not streaming out audio?
The other apps (SiriusXM, Pandora or WDET Radio) are the ones streaming audio.
I uninstalled the Connected BMW app and each of the three apps (SiriusXM, Pandora and WDET Radio) played continuously for 20 minutes. I never used the connected app anyway.
Check this question
It may be because the Android OS would have killed the service due to lack of resources. You can make your service foreground to avoid it. Here is the snippit:
Just call it in onCreate of service.