0

It seems that if I set targetSdkVersion to 26, when I require the draw over permission the app will always crash in Android wear 1.5, with "permission denied for this window type" because it doesn't have a runtime permission check like AW 2.0 does.

I found the same problem here: Requesting permissions on Android wear

So I followed it and changed the wear gradle's targetSdkVersion to 22, and it works both fine on 1.5 and 2.0, it even doesn't ask for permission in 2.0. BUT a big problem is that I can't update the app any more, it says "new target SDK 22 doesn't support runtime permissions but the old target SDK 26 does" You have to uninstall first.

Can't update

Does that mean if I publish it then no one can updated it on Play store anymore?

Or are there a better way to solve the first draw over (SYSTEM_ALERT_WINDOW) permission instead of changing the targetSdkVersion?

Thank you!!!

Henry Zhang
  • 56
  • 2
  • 4
  • As that dialog says, you can't downgrade `targetSdkVersion` in an app update. I believe that the Play dev console won't let you create an "update" with a lower `targetSdkVersion` than what you already have published - but it's been a while since I tried that. – Sterling Nov 03 '17 at 02:26
  • Yes, so it is quite annoying, because the problem can't be solved unless creating a completely new app on the play console... Did you solve the problem at last? – Henry Zhang Nov 20 '17 at 21:09
  • in your Google+ post on this issue you said you hadn't uploaded the higher `targetSdkVersion` to Google Play. If that's true, then you don't have a problem. – Sterling Nov 21 '17 at 04:35

0 Answers0