3

I think this is possible using the SettingsAPI as mentioned by one of the Answerer for the below given post:

Turn on the GPS on automatically like OLA cabs app

But is it possible to use SettingsAPI in react-native without diving into Java?

Community
  • 1
  • 1
shet_tayyy
  • 5,366
  • 11
  • 44
  • 82

2 Answers2

0

If there's no module for that (I can't find any) you have to implement Settings API in Java unfortunately. If the Java API is simple it don't have to be hard. Look at docs and other third party modules for an example.

Radek Czemerys
  • 1,060
  • 7
  • 17
0

You can use this npm module: https://www.npmjs.com/package/react-native-android-location-enabler

It allows to turn on GPS even without open Android settings

Stich
  • 2,331
  • 1
  • 15
  • 31