i have a project in eclipse with some permissions, when i run this project in eclipse and device is upgraded to Android M, then the permissions of the app are enable by default.(go to settings->apps->your app->permissions, all are enabled) but when i run in Android studio the permissions are disabled by default. any solutions for this.(go to settings->apps->your app->permissions, all are disabled)
Asked
Active
Viewed 1,287 times
1

Dhaval Patel
- 10,119
- 5
- 43
- 46

parvez rafi
- 464
- 4
- 20
-
maybe on eclipse your targetSdkVersion 22 and on android studio your targetSdkVersion 23 – Ragaisis Nov 20 '15 at 07:34
-
1Use below link http://stackoverflow.com/questions/33666071/android-marshmallow-request-permission/34722591#34722591 – Dixit Panchal Jan 11 '16 at 13:22
2 Answers
1
You shouldn't ask for permissions, which you don't use. That's why in Android Studio permissions are disabled by default. But you can add permissions in your manifest
file with tag <uses-permission>
, for example
<uses-permission android:name="android.permission.INTERNET" />
Place it before your <application>
tag

RexSplode
- 1,475
- 1
- 16
- 24
1
Finally solved this, it is because if your targeted sdk version is set to 23 then all your all permissions will be disabled by default, thats what happening with me because my Android studio targeted version was set to 23 and in my eclipse it was 21, so if you set your targeted version less then 23 your permissions will be Enabled by default and if greater or equal to 23 then permissions disabled by default.

parvez rafi
- 464
- 4
- 20