Reputation: 497
react native provide developer with geolocation will this geolocation still be able to fetch coordinate even though you are offline or zero connectivity
i have been searching through the internet and i found someone said it is usable, and it require developer to add code below to manifest file
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
where is the manifest file and where to put?
is there any special way do to fetch coordinate in offline mode? or it just came like that what is the accuracy when it went offline mode if it is not available in offline mode is there any other alternative?
Upvotes: 0
Views: 1318
Reputation: 2037
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
is just the android permission to use geolocation, from what I know, without this line geolocation won't work at all.
You add it to AndroidManifest.xml
located in <YOUR PROJECT>/android/app/src/main/
The documentation doesn't say anything about offline but the description for the enableHighAccuracy
option says "...If set to true, a GPS position will be requested...", and indeed on the emulator, when offline, it works and returns the position using only GPS but in the real devices I've tried it didn't work. I'm still looking for a solution...
Upvotes: 1