Is android.permission.READ_PHONE_STATE necessary?

Answered

Comments

4 comments

  • Avatar
    Gayview Mahat

    Hi,

    In fact, READ_PHONE_STATE permission is needed to obtain the UUID of the device.

    Generally, Android ID is used as HWID (hardware ID) in Pushwoosh; if it is invalid, then the IMEI is used, that's why it is recommended to add READ_PHONE_STATE permission. If no device ID is available, then the random UUID is generated.

    Therefore, adding READ_PHONE_STATE permission is not necessary.

  • Avatar
    andersdp

    Great, thanks. As a test i've tried removing it from our app. We're currently running a beta through the Play Store.

    Do you know of any info regarding how often the hardware id is invalid?

  • Avatar
    Gayview Mahat

    There are no hard numbers on how often ANDROID_ID is unavailable, but I believe that happens quite rarely. Please also note that if ANDROID_ID is not available, features like AppGroups or cross-application user targeting will not work for this device.

  • Avatar
    Pascal Weber

    @Pushwoosh: Please remove this permission from the guide if it's not needed anymore.

    It's not nice to just add every conceivable permission to the guide, because they might have been needed 5 years ago.

    Adding new permissions will cause auto-update not to work, which means you will lose exactly those users that aren't using the app regularly, and that you wanted to reach with push notifications.

Please sign in to leave a comment.