I dont know why this issue is coming up suddenly. Please help
It seems that google updated some android libraries yesterday and as result this package is broken again. I'm getting sick of how fragile dependencies are in react-native ecosystem.
For the moment you can try to force previous versions of play-services v11:
In your project edit file android/build.gradle and add configurations.all section:
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
configurations.all {
resolutionStrategy {
// Add force (11.4.0 is version you want to use)
force 'com.google.android.gms:play-services-base:11+'
force 'com.google.android.gms:play-services-location:11+'
}
}
}
}
@mauron85 Thanks, it worked!
I have a few more queries now. Would appreciate if you could provide your inputs on the same.
Below is the configuration which I am using for Android and iOS.
BackgroundGeolocation.configure({
desiredAccuracy: 10,
stationaryRadius: 1,
notificationTitle: 'Background tracking',
notificationText: 'enabled',
debug: false,
startOnBoot: false,
stopOnTerminate: false,
locationProvider: Platform.OS == 'ios' ? SBackgroundLocation.getInstance().getBackroundLocation().DISTANCE_FILTER_PROVIDER : SBackgroundLocation.getInstance().getBackroundLocation().ACTIVITY_PROVIDER,
interval: 120000,
// fastestInterval: 5000,
// activitiesInterval: 100000,
stopOnStillActivity: false,
});
Android : Instead of interval I would like to update the location based on kms travelled. Is there any provision for that ?. if not, could you please suggest me the filename where I can make the changes?
iOS : The BGlocation gets called at times even if the App is stationary. What is the best config for iOS ?.
@mauron85 it's not working for me
Most helpful comment
@mauron85 it's not working for me