[Solved] Workaround for Android 6.0 Permissions

Introduction

Android 6.0 Marshmallow introduced a new permissions model that gives users more control over the data apps can access. This has caused some issues for developers, as users must now grant permissions at runtime instead of during installation. This article will discuss a workaround for this issue, allowing developers to continue to use the old permissions model while still taking advantage of the new features of Android 6.0.

Solution

1. Request permissions at runtime:

Android 6.0 (API level 23) introduces a new permissions model that streamlines the app install and auto-update process. Apps must request permissions to access sensitive user data (such as contacts and location) or certain system features (such as camera and internet).

2. Use the new Permission Model:

The new permission model allows users to grant or deny permissions when the app needs them, instead of granting them all when the app is installed. This means that users can control which permissions an app can access, and can revoke those permissions at any time.

3. Use the Support Library:

The Android Support Library provides a set of APIs that allow developers to easily check and request permissions at runtime. This library is available for all versions of Android, including Android 6.0.

4. Use the Permission Checker:

The Permission Checker is a utility class that can be used to check if a permission has been granted or not. This can be used to determine if a permission needs to be requested or not.

5. Use the Settings API:

The Settings API allows developers to open the app settings page directly from within the app. This allows users to easily grant or revoke permissions without having to go through the app settings page.


Change your targetSDK to 22 will work on all device without permissions runtime, If your targetSDK is 23 than you have to set permission you can’t overcome this.

3

solved Workaround for Android 6.0 Permissions