Closed sirusbaladi closed 1 week ago
2024-04-27 13:58:15.614 🔵-[TSLocationManager beginStopDetection] ⏲Stop-timeout engaged: 900 s...
You didn’t show any logs after 13:58.
2024-04-27 13:58:15.614 🔵-[TSLocationManager beginStopDetection] ⏲Stop-timeout engaged: 900 s...
You didn’t show any logs after 13:58.
Added complete logs. I ended the logs there because then I manually triggered the notification through a button. If you see there's a hole from 13:34 to 13:57.
2024-04-27 13:34:22.684 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1 ╚═══════════════════════════════════════════════════════════
the last report from the motion api was “on_foot”. In the eyes of the plug-in, that device is moving.
the motion api is handled by the OS.
2024-04-27 13:34:22.684 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1 ╚═══════════════════════════════════════════════════════════
the last report from the motion api was “on_foot”. In the eyes of the plug-in, that device is moving.
the motion api is handled by the OS.
But isn't it weird that it stops checking? During that time I sat on a bench for 15 minutes. Before that the logs kept updating every few minutes.
Also, when I usually open the app and close it I receive the notification "continue stationary" or "is moving". When I opened the app to manually trigger the button and the close it, I didn't. It took a while to wake up again.
This has happened a few other times that it misses the stationary mode completely.
The plug-in is not responsible for the performance of the motion api. The plug-in only turns it on or off. Once on, the motion api fires events.
If that's the case, then why when I open the app while in stationary mode and close it, the plugin sends a notification "continuing in stationary mode" even if the motion API did not change? It means that when you open and close the app the plug-in does a check anyway.
When I was sitting at the bench and I opened and closed the app, the plugin sent no notification. It was like freezed.
The plug-in responds to whatever the motion api reports.
the plug-in has no control over when the motion api reports information.
The plug-in responds to whatever the motion api reports.
the plug-in has no control over when the motion api reports information.
okay, I went out again for further testing and there's definitely an issue regarding the plugin.
The expected behavior would be, me not needing to open the app for the plugin to update the motion change.
I attached some logs. The end are when I manually open the app. Please ask me questions if needed.
Create for me a simple “hellow-world” app which reproduces the issue. Share it with me in a public GitHub repo.
definitely an issue regarding the plugin.
I disagree.
I don’t see anything unusual in this image.
I don’t see anything unusual in this image.
Here's what's wrong:
Do you understand what the green polyline means? See api docs Config.stationaryRadius for more info.
Do you understand what the green polyline means? See api docs Config.stationaryRadius for more info.
Okay that's only one of the points I brought forward. Section 2 is still off and missing the updates. The blue line on the way to the park should not jump buildings like that.
Look how consisted it is here and with regular updates!
desiredAccuracy = 100;
See API docs Config.desiredAccuracy
desiredAccuracy = 100;
See API docs Config.desiredAccuracy
I already saw that. the desired accuracy is 50. those were old settings. In fact, at the beginning (first 10 minutes) the updates are regular (section 1), then they are not (section 2). each time I test, the same happens.
Also be aware that GPS is affected by tall buildings, such as those found in Manhattan.
when you don’t use a desiredAccuracy the includes GPS, you’re not using GPS.
the desired accuracy is 50
A value of “50” is not a recognized setting for desiredAccuracy. See the api docs and first test with highest possible accuracy.
the desired accuracy is 50
A value of “50” is not a recognized setting for desiredAccuracy. See the api docs and first test with highest possible accuracy.
I misspoke, I meant distanceFilter = 50. I'm changing the desired accuracy to BackgroundGeolocation.DESIRED_ACCURACY_HIGH and testing again. Hopefully that will fix also the motion API issue. Will get back to you soon.
Hopefully that will fix also the motion API issue.
The motion api is not affected by the Location API.
Also be aware that GPS is affected by tall buildings, such as those found in Manhattan.
when you don’t use a desiredAccuracy the includes GPS, you’re not using GPS.
that area of Manhattan doesn't have tall buildings.
1) on the way to go to the park, there's a jump in location. The only reason why the plugin caught up is because I manually opened the app. 2) If you see the app on the way back stopped tracking both position and motion. Hours later is still not updated. Phone is being used but I'm not opening the app.
This behavior is consistent with all my tests: At the beginning the plugin works flawlessly, after 10/15 minutes for no apparent reason it stops tracking location and motion. It freezes, unless I manually open the app. It is as if the plugin is being killed after 10/15 min of background execution.
Go on a much longer test.
Go on a much longer test.
Sure, will do that tomorrow and report back but I doubt anything will change. The behavior is too consistent, always stops at 10/15 minutes. Moreover yesterday I had the plugin on and went on a long trip and same thing happened.
Update: I just refreshed the tracker website and the plugin still did not update the location. My guess is that it will never update it until I open the app.
Update2: I finally decided to open the app, and as expected, the path got updated with a jump and the motion changed to stationary. This proves that the problem is not localized to the motion API as you suggested before but also to the location API and makes it more plausible for it to be a plugin issue.
I’ve been field-testing this plugin almost daily for nearly 10 years. It tracks me everywhere I go without issue.
I wonder if it could be about the expo plugin? I'm using eas build.
To double check, in the documentation it is written to add the following:
"BGTaskSchedulerPermittedIdentifiers": [
+ "com.transistorsoft.fetch",
+ "com.transistorsoft.customtask"
+ ]
I substituted the bundle Identifiers there, with the one of my app. Is that correct?
and at the end of the documentation I notice:
You must build ALL platforms, both iOS and Android: eas build --profile development
I've done that the first time, but now I only do: eas build --profile preview --platform ios
background-fetch does not affect location-tracking performance.
Here is today’s walk.
I believe it works. Is that android or IOS?
Here's my experiment today, I took out both the android and iphone device at the same time. On android is flawless:
on IOS a mess:
On android I used your test app, on ios my implementation, it's very simple and basic, you can find it below. https://github.com/sirusbaladi/geolocationDebug
My screenshot is iOS. I never have a problem with either.
I sent you the hello world app above, is there anything wrong with it?
I suggest you install my demo app (linked in the readme).
I suggest you install my demo app (linked in the readme).
I already did as mentioned above for android, will try for ios. But I'm not sure how does that help.
The issues seems to be fixed now. I rewrote everything again following the Hello World example. I'm yet not sure where the issues was as I don't have time to properly investigate it, I suspect it might has to do with the way I was using async in some plugin's functions.
Your Environment
react-native -v
): "0.71.14