Facebook-sdk-for-unity: READ_PHONE_STATE added

Created on 26 Jan 2017  ·  6Comments  ·  Source: facebook/facebook-sdk-for-unity

When I compile for android, this sdk always adds read_phone_state permission. Is there any way to avoid this?

Thanks in advance

Most helpful comment

Having READ_PHONE_STATE -permission added is crazy stuff, nobody wants this dangerous-flagged permission in their app, unless they need to manipulate the phoning capabilities somehow. The prompt about this permission to the users could turn away the majority of potential users.

It seems this may be the cleanest workaround:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" /> [(https://stackoverflow.com/questions/41234205/warnings-your-apk-is-using-permissions-that-require-a-privacy-policy-android-p)]

(EDIT: I'm using Unity 2017.1)

All 6 comments

"The Android build enforces READ_PHONE_STATE if the code has references to SystemInfo.deviceUniqueIdentifier."
source

This is being used by Facebook here.

I have this issue on Unity 5.3.3f1 but according to reports it starts with Unity 5.1.

That's a big issue for us.
It's unacceptable that a society like facebook haven't fixed this yet.

Same for us. Will this be changed in future?

Same problem here, is this a bug or will be like this in future versions?

Finally, I download source code, remove this line, and recompiled, and it runs well.

Having READ_PHONE_STATE -permission added is crazy stuff, nobody wants this dangerous-flagged permission in their app, unless they need to manipulate the phoning capabilities somehow. The prompt about this permission to the users could turn away the majority of potential users.

It seems this may be the cleanest workaround:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" /> [(https://stackoverflow.com/questions/41234205/warnings-your-apk-is-using-permissions-that-require-a-privacy-policy-android-p)]

(EDIT: I'm using Unity 2017.1)

Was this page helpful?
0 / 5 - 0 ratings