-
Notifications
You must be signed in to change notification settings - Fork 370
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
[Bug]: Egregious levels of battery drain on 5.0.3 #1880
Comments
@isles1217 Thank you for reporting agreed this is high priority we are investigating. |
Thank you! For added context: due to the nature of our application, our app stays alive in the background (via a foreground service) while our hardware is connected, so this battery drain can go on much longer for users of our app versus others (whereas other apps in the background would get killed by the OS after some time) |
@isles1217 If you have any more verbose logs from devices with the battery drain did you notice any failed requests that were continuously retried while the app was in the background? |
@emawby I did look for excessive failure logs after seeing #1830 , but didn't find them. I am seeing a ton of logs that include the following tags: |
@isles1217 I am surprised about seeing lots of |
Anecdotally, about ten or so minutes ago, I saw
|
@isles1217 Do you have any ideas about why the app id is null or why init is being called multiple times in a row? If possible could you share the code that is calling init here?. |
No idea. We initialize OS once in a singleton. The extraneous calls were happening when the app was in the background and idle. Here's our initialization code, called from the application's
|
Just wanting to chip in, and let you know that once we upgraded to |
Hi @isles1217,
Your initialization code you shared look like it is for v4 of the Android SDK.. Are you doing the exact equivalent in v5? Is |
Hi @hannojg, yes
|
We made a number of battery improvements in 5.1.7. Could you give 5.1.8 or newer a try and let us know if it helps? |
We haven't seen any recent reports of this issue and with the recent improvements we believe the issue has been fixed. Please open a new issue if you continue to see issues with the latest version. |
What happened?
Since upgrading to OneSignal 5.x.x, we've been noticing egregious levels of battery drain that disappear after reverting back to 4.x.x. Our users have started to notice as well, and we're starting to get slammed with negative reviews on the Play Store because of this. From my observations, I'm seeing up to 20% of my device's battery getting drained AN HOUR, even with my screen off and my app backgrounded. What is going on in this new version?
Steps to reproduce?
What did you expect to happen?
OneSignal should not eat up my device's battery
OneSignal Android SDK version
5.0.3
Android version
13
Specific Android models
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: