Complete the code to import the React Native Geolocation API.
import Geolocation from '[1]';
The correct package to import for React Native Geolocation is react-native-geolocation-service.
Complete the code to request location permission on Android.
const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.[1]);To get precise location, you request ACCESS_FINE_LOCATION permission on Android.
Fix the error in the code to get current position.
Geolocation.getCurrentPosition([1]);The first argument to getCurrentPosition is a success callback that receives the position object.
Fill both blanks to watch location changes and handle errors.
const watchId = Geolocation.watchPosition([1], [2]);
The first argument is the success callback for position updates, the second is the error callback.
Fill all three blanks to clear the location watch and stop updates.
Geolocation.[1](watchId); // To stop watching, call [2] with the [3] returned by watchPosition.
You use clearWatch with the watchId to stop location updates.
