Closed Hector52mrs closed 5 years ago
hello sir, please update me asap
See #stopOnTerminate
Yes, your iOS app does terminate. It will reboot after you move by at least 200 metres and resume tracking. It's completely in iOS' hands to reboot your app and depends upon the local network environment and requires Wifi enabled.
i already enable stopOnTerminate to false and also after i terminated the app i ride the bike around 2 km but plugin does not resume the tracking. Why plugin is not stored the locations after app is terminated ?
i am calling getLocations ()
method in onLocation ()
method
with debug: true
, the plugin will tell you and notify you when iOS reboots your app in the background. If you don't see and hear iOS re-awakening your app, then your app is not rebooting, thus no locations recorded.
The plugin is at the mercy of iOS and your local network environment (and wifi enabled). All you can do is stopOnTerminate: false
and keep testing in other directions.
if i am moving around 2-3 km and after that app also not rebooted then what should i do ?
I do not know. It it works in the sim, your problem is the network environment (eg: spacing of cell towers, lack of wifi signals).
no man, i am giving 4g network and network speed is not slow.
If it works in sim, that's all you can do.
i tested in both sim and wifi but at both time plugin is not worked after app is terminated.
I already saw your video man, i am not telling that problem is in your plugin but i am telling that your problem is not work in my project and i am just telling you please find how ?
And i am calling http URL custom not from plugin
And also i want to ask that, is this plugin store the location when device is offline ?
is this plugin store the location when device is offline ?
Yes
Hello Man, onLocation method is also call after app is terminated but only when i am testing in the simulator. But when i am testing the app in real device then onLocation method does not call after app is terminated. and also after app terminated, i moved around 2-3 km but no any get update. Why man ?
It’s completley up to iOS to reboot your app after termination. If it works in the sim, that’s all you can do. Everything else depends upon your network environment and device settings (eg spacing of cell towers, WiFi enabled on device, “Always” location authorized.)
When I personally test in countries around the world (USA, Canada, Mexico, Dominican Republic, UK, Iceland), it takes about 200 meters movement for app to reboot,
ok let me check
Closed for lack of feedback.
@christocracy What do yo mean " If it works in the sim, that’s all you can do. Everything else depends upon your network environment and device settings (eg spacing of cell towers, WiFi enabled on device, “Always” location authorized.)"? I have same issue. And I can not still solve that problem. and I tested your plugin with real device(IPhone 6) which I can not call someone with. Then in my device background location service doesn't work? because of lack of sim?
+) Because my device can not service 3G or 4G ( - I bought that for the purpose of testing app at the flea market), I tested your plugin turning on hotspot to use wifi.
@yomencity I test with iOS devices with no sim all the time (iPhone 6s, iPhone 5). They have no trouble at all with tracking. Obviously they can't upload locations until I return to my office Wifi network.
Then, what is the problem in my case? I made stopOnTerminate be false already and walked more than 2 miles.
And I don't have any trouble in android
@christocracy Would you show me your code especially about setconfig?
setConfig is irrelevant.
Show me your logs.
logs which I get with adb logcat?
In IOS I only get the message "waiting device" after I command adb logcat.
There’s no such thing as adb logcat with iOS. See wiki Debugging.
Then, What should I show you? my code?
Read the wiki Debugging.
Sorry I don't know which part I should show you. It's very looooong
Why are you sending me Android logs for an iOS issue??
Do you know what “adb” means? Android Development Bridge.
If you can’t figure out the difference between Android logs vs iOS logs, no wonder you have issues.
Which one you install first? cordova-background-geolocation-lt plugin or platform?
I showed you the log using IOS console app. ignore the file name
Your logs are useless. The instructions to fetch plugin logs are in the Wiki Debugging.
I’m ready to give up on you.
I already read so many times. But I don't know what the problem is. xcode -> window -> device -> openlog. Is this not correct way? you can teach me how to get log about your log. please don't give up.
It’s all explained In Wiki Debugging. This is your last chance.
Thanks for your chance. But I want to ask you a question. step1) bgGeo.getLog(function(log) { console.log(log); }); step2 ) When testing at your work-station, you can observe the plugin logs in XCode:
Is this way right?
knock knock...
I am not provide any url to config of plugin but i am using
this.bgGeo.getLocations().then((locations)=> {});
method to track. this plugin is worked fine when app is running but after app is terminated plugin does not work. i.e. plugin does not store location when app is not running.when am i used simulator to test plugin with Freeway Drive then
getLocation()
method is worked after app is terminated but when i am used real device then app is not worked after app is terminated.When i test this plugin with real device then i put
distanceFilter: 50, stationaryRadius:50
and i am going around 3 km for testing but after app is terminated , plugin does not work.Your Environment
cordova -v
): 8.0.0cordova platform ls
): 4.5.4Plugin config `this.bgGeo.ready({ // Geolocation config desiredAccuracy: 0, distanceFilter: 50, stationaryRadius: 50, // Activity Recognition config stopTimeout: 5, // Application config debug: true, // <-- Debug sounds & notifications. reset: true, logLevel: this.bgGeo.LOG_LEVEL_VERBOSE, stopOnTerminate: false, startOnBoot: true, method: "POST", autoSync: true, maxDaysToPersist: 3
}, function(state) { // This callback is executed when the plugin is ready to use. console.log("BackgroundGeolocation ready: ", state); // this.bgGeo.start(); });`
please see my whole code for better understand.
this.platform.ready().then(() => { this.bgGeo = (<any>window).BackgroundGeolocation; this.onDeviceReady(); });
`onDeviceReady() {
}`
`
onLocation(location, taskId) { console.log('- location: ', location); if(location.sample === true) {
} `
Expected Behavior
Actual Behavior
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs