Open Nabeel07925 opened 1 month ago
You’ll have better/worse performance on different devices.
my Pixel 6 performs beautifully.
I see. Secondly, about the motion type not working properly, is it something wrong with my configuration or a bug in the library?
is it something wrong with my configuration or a bug in the library?
No. The Motion api is provide by Google Play Services. It’s proprietary code created by Google. This api provides nothing more than an ON/OFF switch. It is not configurable.
Thanks for the quick response @christocracy. I see an option activityRecognitionInterval in the docs which is deprecated, that's why I asked. Actually I worked with the google activity recognition api earlier and it was pretty accurate but the downside was I wasn't able to configure it to work in the background (when app terminates) so I shifted to this library. Is there anything we can do to improve the results?
activityRecognitionInterval
That option is no longer used. It comes from the old Android ActivityRecognitionApi. This plug-in transitioned to the more modern ActivityTransitionApi years ago.
Is there anything we can do to improve the results?
I already answered this question: no. The api is either ON or OFF. Everything else depends upon Google’s proprietary code, the quality of the sensors on your device and the manufacturer’s version of the Android OS running on your device.
there is no configuration for the plug-in that affects the performance of the motion api.
Got it. thanks for confirming.
This issue is stale because it has been open for 30 days with no activity.
Two issues/questions
Your Environment
System:
react-native -v
): 0.72.6Plugin config:
package.json
Expected Behavior
I should immediately get both motion and location updates without any delay as soon as I start moving with correct motion type.
Actual Behavior
Sometimes, motion updates don't work in the background. It starts working after 10, 20 minutes all of a sudden. I don't have any geofencing enabled as of now. Also motion update is not correct most of the times. It gives walking when I am in a vehicle and sometimes gives in_vehicle state when I am idle or walking.
Steps to Reproduce
Just run the app with these configurations, terminate the app and check the updates in db or server. I am not sure if the issue I am facing is because of some misconfiguration or it's an actual bug.
Context
I am trying to develop a car parking application where the mobile of the user is used a tracker. I rely heavily on the motion and location updates from this library. When the motion type changes from in_vehicle to walking, I check a couple of events on my side and update the parking location of the car. Without motion update within seconds, the app doens't work correctly.
Debug logs
Don't have logs