RN: 0.59.8
in android should fire functions
and in ios should send location updates when app terminates
function events not fired in android, and location updates not send in ios
@mauron85 Yes, I am also getting this issue especially on Android.
I am using the below listener to get location. But mostly I don't get any location and neither it throws any error. But if I check the status it shows as Running. ( BackgroundGeolocation.on('error', (error) => {
console.log('[ERROR] BackgroundGeolocation error:', error);
});
)
BackgroundGeolocation.on('location', (location) => {
}
BackgroundGeolocation.on('stationary', (stationaryLocation) => {
});
@hasanal1995 @sujay-bidchat I am also not getting any event on android.
Did you find solution to this?
@Dhanraj-bidchat eventually no,
@mauron85 plz we need help here
@hasanal1995
after upgrading I restarted android powered device and now its working for me.
Restarting device is not a better way though.
sorry, clarify how to fix it plz?
in details @Dhanraj-bidchat
use this method and check if status is running:
// you don't need to check status before start (this is just the example)
if (!status.isRunning) {
BackgroundGeolocation.start(); //triggers start on start event
}
});
-> BackgroundGeolocation.on('location', (location) => {
// handle your locations here
console.log('[INFO] BackgroundGeolocation service is running', location);
});
ok, i will try and tell you with updates.
thank U very much @Dhanraj-bidchat
still not working bro @Dhanraj-bidchat
on location updates not fires
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.
Most helpful comment
@mauron85 Yes, I am also getting this issue especially on Android.
I am using the below listener to get location. But mostly I don't get any location and neither it throws any error. But if I check the status it shows as Running. ( BackgroundGeolocation.on('error', (error) => {
console.log('[ERROR] BackgroundGeolocation error:', error);
});
)