How do I request permission for Android Device Location in React Native at run-time?

前端 未结 6 1872
后悔当初
后悔当初 2020-12-09 15:47

I have been trying to use React Native \'s GeoLocalisation for an Android App. The poorly documentated module is found here https://facebook.github.io/react-native/docs/geol

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 16:25

    You could use the react native PermissionsAndroid to request the permission: https://facebook.github.io/react-native/docs/permissionsandroid.html#request

    Or, an easier option will be using a library that does it for you, such as https://github.com/yonahforst/react-native-permissions

提交回复
热议问题