0

I am looking for the following requirement. The job has to be triggered from background (even if the phone is locked) periodically every 1 min. I have ignored the battery optimisation by ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.

The job is triggered properly in MOTO phones (may be due to stock android). But it fails for Samsung phones with Android versions 6.0 and 7.0.

Is there any API from Samsung, which can whitelist the app? Is there any setting in Android or Samsung Smart Manager, to allow this.

PS: I am yet to check with other devices (Huawei, LG etc). Feel free to share behaviour of other devices.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Shuaib Akram
  • 9
  • 1
  • 1
  • I faced the same kind of issue in Redmi phones. When screen is off it blocks all the background services. I removed blocking of services in settings -> battery usage. – Rakesh Polo Nov 06 '17 at 11:07
  • 1
    every minute is a unrealistic requirement. Doze will mess it up badly – Tim Nov 06 '17 at 11:07
  • @TimCastelijns I am ok if this happens in Doze mode. Right now it is stopped in 5 minutes on Samsung phones. – Shuaib Akram Nov 06 '17 at 11:19
  • Depending on what type of app you are writing, you can send Push Notification Messages via Firebase (free), that will wake up the device when the google service picks up your message no matter what. It is excluded from the Dozed services. I have tested it and am using it in production like this with no problems – Pierre Aug 08 '18 at 08:38

0 Answers0