PurplePanda
PurplePanda

Reputation: 683

My React Native App for android requires way too many permissions

I made a create-react-native-app app and published using the recommended way with expo. The app is on the google play store but during the process of submitting it for some reason it required me to have a ton of permissions. The app uses none of these so I want to know how I can get rid of these as it is confusing to users. Here is the list of current permissions:

Version 1.0.0 can access: Contacts read your contacts Location approximate location (network-based) precise location (GPS and network-based) Phone read phone status and identity Photos/Media/Files read the contents of your USB storage modify or delete the contents of your USB storage Storage read the contents of your USB storage modify or delete the contents of your USB storage Camera take pictures and videos Microphone record audio Device ID & call information read phone status and identity Other manage document storage receive data from Internet view network connections full network access draw over other apps control vibration prevent device from sleeping install shortcuts read Google service configuration

Upvotes: 1

Views: 1543

Answers (1)

Federico Ojeda
Federico Ojeda

Reputation: 768

it seems that react-native has this known issue. There's a discussion related to this here https://github.com/facebook/react-native/issues/5886

It looks like react-native adds some permissions by default. Due to the fact that you used create-react-native-app, you do not have access to the native code, which can be a problem. If you perform the eject action, and you check out the Android manifest file, there a lot of lines like the following:

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

This defines which permissions you ask in your app. By deleting them, you remove them. Just be sure that those permissions are not actually needed!

Beware, performing an eject is a one way action, you can never go back.

Hope it helps! Regards,

For more information on Android permissions, please check this https://developer.android.com/guide/topics/permissions/index.html

Upvotes: 2

Related Questions