-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High-Frequency Background Events and Invalid Battery Level on Specific Samsung Devices #298
Comments
Hi, I wanted to add a few queries to help with diagnosing the issue:
Let me know if you need further information or specific logs to assist with debugging. I'm happy to provide more details as needed. |
It sounds like you’ve created an infinite loop somewhere. show your code. |
If this were due to an infinite loop, the issue would likely occur across all devices. Our app has been downloaded 19.8K times on the Google Play Store and 6K times on the Apple App Store, with around 5K monthly active users. Despite this, the problem is only observed on the specific devices mentioned in the issue. This leads me to believe that the behaviour is specific to those particular device models, potentially due to a hardware, firmware, or configuration-related issue. To clarify further:
Let me know if additional logs or configurations are required to debug this further. |
Hello @christocracy I just wanted to share one more detail that might help you give some suggestions. For all the problematic updates where battery.level is -21474836, the activity field always shows:
Could this indicate anything specific, or do you have any suggestions on what might be causing this behaviour? Your guidance would be greatly appreciated. |
Your Environment
Plugin version: 6.0.3
Platform: Android
Device OS version: 12
Device manufacturer/model:
XCode version: Not applicable (issue on Android)
Capacitor info
Latest Dependencies @capacitor/cli: 6.2.0 @capacitor/core: 6.2.0 @capacitor/android: 6.2.0 @capacitor/ios: 6.2.0
Installed Dependencies: @capacitor/cli: 6.1.1 @capacitor/core: 6.1.1 @capacitor/android: 6.1.1 @capacitor/ios: 6.1.1
#ready
:Expected Behavior
Devices should send background events (e.g., providerchange, motionchange, location) at reasonable intervals, no more than the configured rate (e.g., 30 updates per hour). The battery level should report valid values between 0 and 1.
Actual Behavior
The following Samsung devices are sending background events (providerchange, motionchange, location) excessively, at a rate of 4-5 updates per second. Additionally, these devices report an invalid battery level of -21474836 in the battery.level field.
Affected devices:
Steps to Reproduce
Context
I am using the plugin to track location updates in the background. The high-frequency events and invalid battery levels are overloading the server and causing incorrect behavior.
I am using the plugin to track background location updates in my app, with a maximum expectation of 40 updates/hour from genuine devices. However, the mentioned Samsung devices are sending background events excessively, sometimes 4-5 times per second. This behaviour is observed across multiple event types, including:
Note: Additionally, the battery.level field consistently reports an invalid value of -21474836 on these devices.
Debug logs
Logs
The text was updated successfully, but these errors were encountered: