2.7.00.44.0Plugin config
desiredAccuracy: 0,
stationaryRadius: 25,
distanceFilter: 10,
stopTimeout: 1,
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
stopOnTerminate: false,
startOnBoot: true,
I have a listener attached. I have tried when app is initialized and after .configure (in the cb).
BackgroundGeolocation.on('location', l => console.log('heard location', l), e => console.log('heard error, e));
I am getting the location after .configure with
BackgroundGeolocation.getCurrentPosition(l => console.log('got location', l), e => console.log('got error, e));
When I successfully get the location, the first getCurrentPosition cb runs as expected (with l) and the .on success cb fires as expected (also with l).
When I don't get the location, (i.e. there's an error), the second getCurrentPosition cb runs as expected (with e) but the .on error cb never runs.
The .on listener should run when .getCurrentPosition fails. (And it has done so in the past).
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ -[Settings load:]
{
activityRecognitionInterval = 10000;
activityType = Other;
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = 0;
desiredOdometerAccuracy = 100;
disableElasticity = 0;
disableMotionActivityUpdates = 0;
disableStopDetection = 0;
distanceFilter = 10;
enabled = 1;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 10000;
geofenceTemplate = "";
headers = {
};
heartbeatInterval = 60;
httpRootProperty = location;
isHeartbeatEnabled = 0;
isMoving = 0;
locationAuthorizationAlert = {
cancelButton = Cancel;
instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings";
settingsButton = Settings;
titleWhenNotEnabled = "Background location is not enabled";
titleWhenOff = "Location services are off";
};
locationAuthorizationRequest = Always;
locationTemplate = "";
locationTimeout = 60;
logLevel = 5;
logMaxDays = 7;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
minimumActivityRecognitionConfidence = 70;
odometer = "414.8617109737623";
params = {
};
pausesLocationUpdatesAutomatically = 1;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
startOnBoot = 1;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnTerminate = 0;
stopTimeout = 1;
trackingMode = 1;
url = "";
useSignificantChangesOnly = 0;
}
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- updateCurrentPosition: {
}
๐พ-[LocationManager startUpdatingLocation] ON
- updateCurrentPosition: {
}
โน๏ธ+[LocationAuthorization run:] status: 3
โ ๏ธ-[LocationManager locationManager:didFailWithError:] Error Domain=kCLErrorDomain Code=0 "(null)"
๐ด-[LocationManager stopUpdatingLocation] OFF
I'll have a look. Btw, the latest version is 2.9.4.
Also, customer's should not use this public repo. You should use the private repo react-native-background-geolocation-android. If I post a bug-fix for this issue, it'll arrive first in the private repo. This public repo won't receive an update for several months.
Got it. I'll try reseting everything (i.e. DerivedData, Simulator) and install from that repo.
And upgrade to XCode 9 if you haven't yet.
Problem persists.
Using latest -android and XCode 9. Deleted derived data, cleaned project, cleaned build folder, and reset simulator.
A fix has been posted to the private repo. It won't arrive here in the public repo until the next latest stable release.
Most helpful comment
A fix has been posted to the private repo. It won't arrive here in the public repo until the next latest stable release.