react-native-background-geolocation
react-native-background-geolocation copied to clipboard
[Android] getLocations return empty array
Your Environment
- Plugin version: 0.6.3
- Platform: Android
- OS version:
- Device manufacturer and model:
- Running in Simulator:
- React Native version:
- Plugin configuration options:
- Link to your project:
Context
On compenentDidmount I do
BackgroundGeolocation.getLocations((locations) => {
console.log('allLocations', locations);
alert(JSON.stringify(locations));
},(error) =>{
alert('error')
}
);
Expected Behavior
Get alllocations store by the plugin
Actual Behavior
I get an empty array :(
Possible Fix
Steps to Reproduce
Context
It's work on iOs but not an android (simulator and real device)
Debug logs
I've had this problem, too,How did you solve it?