Android M Permissions : Confused on the usage of shouldShowRequestPermissionRationale() function

I was going through the official doc about the new Permissions model in Android M. It talks about the shouldShowRequestPermissionRationale() function which returns true if the app has requested this permission previously and the user denied the request. If the user turned down the permission request in the past and chose the Don’t ask again … Read more

onRequestPermissionsResult not being called in fragment if defined in both fragment and activity

I have a fragment in which I have recyclerview and setting data in this recyclerview using recyclerview adapter. Now, I am having a button in the adapter’s list item clicking on which I need to check the READ_EXTERNAL_STORAGE permission in android for new permission model in android. I have created a new function in this … Read more

An Android app remembers its data after uninstall and reinstall

While developing an Android app targeting all versions above 4.1, I observed that uninstalling my app and installing it again does not clear its data. The app is designed to store the details that it asks in its first screen. After uninstalling and installing again in OS version 4.4.4, the app prompts the user to … Read more

Android M – check runtime permission – how to determine if the user checked “Never ask again”?

According to this: http://developer.android.com/preview/features/runtime-permissions.html#coding an app can check for runtime permissions and request permissions if it hasn’t been granted already. The following dialog will be displayed then: In case the user declines an important permission, imo an app should display an explanation why the permission is needed and what impact declining has. That dialog has … Read more

How can I programmatically open the permission screen for a specific app on Android 6.0 (Marshmallow)?

I have a question regarding the new Android 6.0 (Marshmallow) release: Is it achievable to display the permission screen for a specific app via an Intent or something similar? It’s possible to display the app settings with the following code – is there an analog solution for directly opening the permission screen? startActivity(new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.fromParts(“package”, … Read more

getColor(int id) deprecated on Android 6.0 Marshmallow (API 23)

The Resources.getColor(int id) method has been deprecated. @ColorInt @Deprecated public int getColor(@ColorRes int id) throws NotFoundException { return getColor(id, null); } What should I do? 13 s 13 Starting from Android Support Library 23, a new getColor() method has been added to ContextCompat. Its description from the official JavaDoc: Returns a color associated with a … Read more