Does Doze apply to apps with minSdk 21 on Marshmallow devices?

102 views Asked by At

My app has minSdkVersion 21 targetSdkVersion 25 compileSdkVersion 25. I am using AlarmManager for some critical periodic checks - this is the client's requirement; they don't want the checks to be skipped or delayed.

I'm not sure how my app and these alarms will be impacted by Doze on Marshmallow or Nougat devices. More precisely, will the OS apply the SDK21 rules and skip doze for my app, or will the OS enforce Doze?

If Marshmallow will enforce Doze, I'd like to use setAndAllowWhileIdle() for these alarms, but I'm unable to do so as the minSDK is 21.

Any help would be greatly appreciated!

1

There are 1 answers

1
CommonsWare On BEST ANSWER

More precisely, will the OS apply the SDK21 rules and skip doze for my app, or will the OS enforce Doze?

The OS will enforce Doze. minSdkVersion has no effect whatsoever on OS behavior, other than whether it is possible to install the app or not. targetSdkVersion can have an effect on OS behavior, but not with respect to Doze mode.