I have an android application which is uploading and downloading a file in every 15 min. I am using AlarmManager setRepeating() to do this, but it is consuming lot of Battery and Inefficient. But i want to restructure this app so that it will work on Marshmallow and above devices. I read about JobScheduler and sync adapter , but the challenge is Doze mode . As per Official Documentation
JobScheduler and Sync Adapter wont work on Doze mode.
So, How to make android app and server communication for every 15 min, even in doze mode.
Thanks.
As per Android developer documents AlarmManager will continue work on marshmallow and above
Standard AlarmManager alarms (including setExact() and setWindow()) are deferred to the next maintenance window.
Use Alarmmanager and let your users deactivate Doze mode for your app (Whitelisting).
Alarmmanager do not consuming a lot of Battery. Alarm event comes from operating system.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.