lakshmipathi lakshmipathi - 3 months ago 12x
Android Question

Understanding Android 6.0 with targetSDK=22 behaviour

I have app (current targetsdkversion is 23) running in version 4.4 & 5.1 but with 6.0 It requires run time permssion.

This needs some coding changes I prefer to defer for sometime. Is it perfectly okay change the targetsdkversion to 22 instead of 23. Does this allow app to be run in 6.0 without using 'run-time permission'? I read app mayn't properly if user decides to change the permission after installation. Im okay with this limitation for now.


Be careful if you have already published the app with targetSdkVersion of 23, those users who have installed it will not be able to "upgrade" to a new version of your app because of the target SDK downgrade. They'll have to uninstall then re-install your app.

But, to answer your question about API levels, yes it will run fine on Marshmallow with target SDK set to 22. The users will be presented with an old style permission accept dialog when installing the app and all permissions will be granted at install time. However, users could go in a disable the permissions via Settings so your app could start receiving SecurityException for protected operations.