OneSignal / OneSignal-Android-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native Android or Amazon app with OneSignal. https://onesignal.com
Other
591 stars 367 forks source link

[Bug]: Excessive wakelocks #1774

Open sureshmaidaragi1 opened 1 year ago

sureshmaidaragi1 commented 1 year ago

What happened?

Due to onesignal library our app is consuming a lot of battery. As you can see that battery historian showing almost 39min wake lock is acquired.

Screenshot 2023-05-06 at 11 25 18 PM

Steps to reproduce?

Just use android onesignal library in your project and generate bug report from android developer settings in phone. Use that bug report in battery historian

What did you expect to happen?

Wake lock should not be more than 2sec for every push notification

OneSignal Android SDK version

4.0.0 4.99.99

Android version

13, 12, 11, 10, 9, 8

Specific Android models

No response

Relevant log output

No response

Code of Conduct

emawby commented 1 year ago

@sureshmaidaragi1 Thank you for reporting we will investigate

sureshmaidaragi1 commented 1 year ago

We found that because of this wakelock our app resulting in huge phone battery consumption, will be waiting to hear your resolution around this

sureshmaidaragi1 commented 1 year ago

Please check some more details here

Screenshot 2023-05-09 at 6 44 41 PM Screenshot 2023-05-09 at 6 53 10 PM Screenshot 2023-05-09 at 6 53 21 PM
jkasten2 commented 2 weeks ago

@sureshmaidaragi1 we have refactored most of the code in our v5 SDK. Can you let us know if upgrading fixes this issue for you?