See more
For what it’s worth, as of Android 6.0, LISTEN_CALL_STATE doesn’t require the READ_PHONE_STATE permission anymore, which is good. But several of the other telephony options do, and you don’t want to risk poorly-wr…
While older versions of Android required developers to rely on a PhoneStateListener as a signal for pausing playback during phone calls, this all changed in Lollipop. On Lollipop+ devices, the state of the phone is properly integrated into the audio focus state and your app will receive AUDIOFOCUS_LOSS_TRANSIENT when the call starts and AUDIOFOCUS_GAIN when it ends. One less API to get right!