react-native-ble-plx icon indicating copy to clipboard operation
react-native-ble-plx copied to clipboard

Using Expo on Android, ask permissions?

Open marchingband opened this issue 2 years ago • 2 comments

I am using EXPO, with the eas build plugin. On iOS, the app requests permissions when it first opens. On Android it does not ask permissions, users must manually give permissions from their device settings, both for Location and Bluetooth. Is there a way to make Android ask for permissions like it does on iOS? Thank you!!

marchingband avatar Aug 07 '22 07:08 marchingband

You can use PermissionsAndroid directly from RN https://reactnative.dev/docs/0.68/permissionsandroid or a community package such as https://www.npmjs.com/package/react-native-permissions

josmas avatar Sep 02 '22 13:09 josmas

In EXPO I believe the plugin is responsible for asking permissions. Do the maintainers of this repo also maintain the expo plugin?

marchingband avatar Sep 02 '22 13:09 marchingband

This behaviour is giving me a headache, because it instantly shows up the permission modal, which interferes with my splash screen on ios and makes my app unusable... On android I use PermissionsAndroid from react to do the logic manually.

Please have the option to disable automatic permission requesting for ios. Thanks.

benjaminhera avatar Jun 19 '23 11:06 benjaminhera

@benjaminhera I think that is the native behavior, not something that can be controlled on iOS.

marchingband avatar Jun 19 '23 15:06 marchingband