Will my old app works normally on Marshmallow? - android

I have an old app which I have to make small changes to, create a new version and update it to Google Play. Do I need to implement the new asking permissions on runtime type? Or can I just update the new version and it will work fine on Marshmallow?

The new Runtime Permission will work only when we set the application's targetSdkVersion to 23. And this feature will work only on Android 6.0 Marshmallow and above. The same app will run with same old behavior on pre-Marshmallow device.
If the device have Marshmallow or above, but your app's TargetSdkVersion < 23, Your app will continue to use the old permissions model, but the user can revoke permissions any time.
Any way if your app declares in its manifest that it needs a normal permission, the system automatically grants the app that permission at install time.

It should still work fine if you use targetSdkVersion 22 or less. If you set targetSdkVersion 23, then your app will crash if you attempt to use a "Dangerous permission" that you did not ask the user for at runtime. Take a look at this page:
https://developer.android.com/training/permissions/requesting.html

yes, it will work on marshmallow.
just include the "target api" to '23' in your manifest file.

Related

Do I really need to request runtime permissions?

Runtime permissions are essential to ensure that your apps get the required permissions to function, on android 6+ devices, however, it seems like some top developers (gameloft, ea games) do not find the need to implement runtime permissions, and they are rather happy on target SDK 22. So my questions are:
Why do I need take the pain of adding run-time permissions, when I can be stay on api 22. This would also save some lines of code.
Is it possible to upgrade from target SDK 22 to target SDK 23 once the app has been published? If I plan to stay on SDK 22 for now. It seems like downgrading is not possible. " Keep in mind that once you publish an APK targeting API level 23 or higher, you won't be able to submit an update targeting API level 22 or lower on any channel. "
Why do I need take the pain of adding run-time permissions, when I can be stay on api 22
Your "I can be stay on api 22" assumption may not hold up well over time. For example, the user will be told that your app is not compatible with multi-window.
Also, users see that the app is not supporting runtime permissions right away at install time, as they are prompted with the classic install-time permission dialog. Users, over time, will start to think that apps that show that dialog are out of date and not being maintained, and so they may not bother installing your app.
Also, certain third-party libraries that you may want to use may insist upon a higher targetSdkVersion.
So, while technically you can have any targetSdkVersion you want, there are costs.
This would also save some lines of code.
Not necessarily. The user can still revoke these permissions from within Settings, and so you may need more error-handling code than before.
Is it possible to upgrade from target SDK 22 to target SDK 23 once the app has been published?
In general, yes.

Disable runtime permissions check for Android M root

Is there anyone who know how to disable danger permissions check for rooted android 6 or grant all of them automatically for my app?
I have rooted tablet Samsung sm-819 with android 6 and an application which used one set of permissions but now I must extend functionality of the application therefore app needs more permission.
The problem is that the app stuck to the screen and only shows ads in taxi cab. It's never interact with user and new permissions can't be granted...
Please help me to find any information about it. I know that it's possibly because different devices don't have the same set of dangerous permission.
You can achieve this by setting targetSdk below 23.
If you are using targetSdk 23 or above, then you need to implement the runtime permission.

Android 6 target sdk=23 permissions on install

I know that if you set target sdk to 23 you now need to ask the users for "dangerous" permissions at runtime like was responded here:
Android 6.0 Permission Error
But some permissions are listed as "normal" and they are required when the app is installed. Is it possible to somehow mark some of the "dangerous" requirements that we have in our manifest to act as "normal" (to require them on install and not at runtime) because without some of them the app cannot actually function properly. Just rewriting everything to ask permissions at runtime is not really an option at the moment, but we will probably do that in the future.
No. There is no way to do what u want.
If you don't have the time to develop it now, you should target SDK 19 (permissions were introduced on Lollipop 21)
edit:
my bad, you should target API 22, as permissions were introduced on API 23. But still, target a lower API is the best option until you have time to properly develop the permission model.
Is it possible to somehow mark some of the "dangerous" requirements that we have in our manifest to act as "normal" ?
No it is not possibile.
The only way to avoid managing the runtime permissions is to use target 22.
But pay attention.
The users can revoke permissions from any app at any time, even if the app targets a lower API level

Does Android 6.0 Changes affects previously published apps (Targeted API lower than 23)

According to Android M Changes page, there is a new platform changes for Android 6.0. and they saying that
If you have previously published an app for Android, be aware that these changes in the platform affect your app.
So if my app is previously released before Android M release, and my app targeting API 21
1- Does this new changes will affect it?
2-Does i have to update my code to follow this new changes to be compatible with Android Mand raise the API Level to be 23?
** take in consideration in Android developer they says
If the API level of the platform is higher than the version declared by your app's targetSdkVersion, the system may enable compatibility behaviors to ensure that your app continues to work the way you expect.
Does this forward compatibility is applied to the Android M changes or not?
** i know this is a foolish version and i am daft man but please i need a help.
Does this new changes will affect it?
Some will. For example, while all of your permissions that you request in the manifest will be granted at install time (as they used to), the user can go in and deny them to your app in Settings. However, usually, all this will do is block access to data from your app, in ways that you should be handling already. For example, you might ask for READ_CONTACTS and query ContactsContract, but you should be handling the case where the user has no contacts. On Android 6.0, you might get no contacts in response to your query because the user denied your app access to contacts.
Does i have to update my code to follow this new changes to be compatible with Android Mand raise the API Level to be 23?
Generally speaking, no. Older Android apps usually work fine on Android 6.0.
However, eventually, there will be something that you want to have that requires targetSdkVersion of 23 or higher, in which case you will need to take other changes into account, such as the runtime permissions. And, you will need to test your app on Android 6.0, to see if Android 6.0's changes trigger bugs in your code.

Android permission gven only from a minimum sdk version onward

Is it possible to declare a uses-permission for an app such that the permission is only given if the sdk version is at least a certain value?
I ask because I recently updated to KitKat (SDK Version 19) and to query for album art, one must now have the READ_EXTERNAL_STORAGE permission. But I don't want those updating the app to require a new permission just because those in 4.4 now require it...
Thanks
Just don't target KitKat, see http://developer.android.com/guide/topics/security/permissions.html
"Over time, new restrictions may be added to the platform such that, in order to use certain APIs, your app must request a permission that it previously did not need. Because existing apps assume access to those APIs is freely available, Android may apply the new permission request to the app's manifest to avoid breaking the app on the new platform version. Android makes the decision as to whether an app might need the permission based on the value provided for the targetSdkVersion attribute. If the value is lower than the version in which the permission was added, then Android adds the permission."

Categories

Resources