I’ve discovered that some of the basic apps on my android phone such as email, gallery, videos appear to have been started when the phone was simply lying on my desk doing nothing – even during the early hours of the morning. Does anyone know if this is to be expected and if so why?
Share
Yeah it’s a normal behavior. It happens when
AppWidgetProvider‘sonUpdate()callback method is called.From android developers:
If the device is asleep when it is time for an update (as defined by
updatePeriodMillis), then the device will wake up in order to perform the update. If you don’t update more than once per hour, this probably won’t cause significant problems for the battery life. If, however, you need to update more frequently and/or you do not need to update while the device is asleep, then you can instead perform updates based on analarmthat will not wake the device. To do so, set analarmwith anIntentthat yourAppWidgetProviderreceives, using theAlarmManager. Set thealarmtype to eitherELAPSED_REALTIMEorRTC, which will only deliver thealarmwhen the device is awake. Then setupdatePeriodMillisto zero (“0”).