Most Apps which include audio playback – mainly audio- and videoplayers but also navigation systems with speech output and games – request READ_PHONE_STATE in their manifest to get notified about incoming calls in the PhoneStateListener() callback.

Unfortunately this permission allows a lot more than just detect incoming calls – for example the App will also see the numbers of the callers or can read the IMEI of the device. Generally there is the conception (also by developers) that this is neccessary – really?

No – in fact this is possible in a better way: Instead of using PhoneStateListener() which requires the permission READ_PHONE_STATE, you can also use onAudioFocusChange(). This does not require any special permissions, does not reveal any confidential data, and this callback is exactly made for the purpose that Apps can reduce the volume of their audio playback or stop the playback at all if neccessary.

Also see: Documentation OnAudioFocusChangeListener

One thought on “Android and READ_PHONE_STATE”

  1. u

    Another prompt that current android and privacy are so distant from each other. No wonder though, what else to expect if leading platform developer also trades private data for profit.

Leave a public comment

Your email address will not be published. This is not a contact form! If you want to send me a personal message, use my e-mail address in the imprint.

You can use the following HTML tags in the comment:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>