Google Play Developer Console says:
A signigicant percentage of daily sessions (more than 1.3%) experienced excessive wakeups, thereby placing your app in the lowest 25% of apps for this metric. However, the actual percentage might be lower than 1.3%, the 95% confidence interval is between 0.55% & 11.82%". Displayed for active APKs only.
However AlarmManager
isn't used anywhere in the project in the latest app version. What could cause such a warning in the Console except an AlarmManager
?
AlarmManager
would count against your app. Also note that waking up the device can be done using other things, such asJobScheduler
, holding your ownWakeLock
, etc. – Journeyadb shell dumpsys alarm
to try to determine if your app has alarms scheduled. – JourneyJobInfo.Builder builder = new JobInfo.Builder(Constants.JOB_ID, new ComponentName(context, MyJobServiceScheduler.class)); builder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY) .setMinimumLatency(PERIODICITY_MILLISECONDS) .setPersisted(true) .setRequiresCharging(false); JobScheduler jobScheduler = (JobScheduler) context.getSystemService(android.content.Context.JOB_SCHEDULER_SERVICE); jobScheduler.schedule(builder.build());
– GummaJobScheduler
is fairly limited in this area, so I cannot rule it out. I would expectsetOverrideDeadline()
to perhaps wake up the device. – JourneyAlarmManager
. Again, useadb shell dumpsys alarm
to try to determine if your app has alarms scheduled. – Journeyadb shell dumpsys alarm
results output. Checked several times, on Android 7.1.1 and 5.1. – GummaJobScheduler
is itself a client of theAlarmManager
API, its alarms appear in the dump. Even if the wakeups are atributed to your app, I think it's a problem inJobScheduler
since it should have ensured a proper wekeup schedule. – FrediaJobScheduler
code and I also don't use any frameworks (except for AdMob). One of my jobs has a schedule at one per minute, however on all devices I've analyzed it, the actual schedule is much less frequent---which is precisely the way you're supposed to use theJobScheduler
service, stating your wish while it ensures your app behaves well. – Fredia