2

I use below code for getting system permission...what happening even if permission is allowed; still it's showing..

@Override
    protected void onResume() {
        super.onResume();
        if (Build.VERSION.SDK_INT >= 23 && !Settings.System.canWrite(ChooseSender_Receiver.this)){
            Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
            intent.setData(Uri.parse("package:" + ChooseSender_Receiver.this.getPackageName()));
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivityForResult(intent, REQUEST_WRITE_SETTINGS);
        }

Note: My problem is even if permission is already allows still it's showing popup..when deny and allows the permission dialog is dismissing.

My device is Moto e2 & Redmi mbls version M

enter image description here

belwood
  • 3,320
  • 11
  • 38
  • 45
Gowthaman M
  • 8,057
  • 8
  • 35
  • 54
  • 1
    Well is this a Device specific problem ? I have just tested it on Android O emulator . And its working fine . Try to test it on several other devices. And let us know the Device info . – ADM Apr 27 '18 at 14:35
  • @ADM thank you sir.. it's working from 7.0 version..I have from below 7.0 as I Mention **My problem is even if permission is already allows still it's showing popup..when deny and allows the permission dialog is dismissing** – Gowthaman M Apr 30 '18 at 06:05
  • Starange . I have just tested it Lenovo device which is running on Android M . And its working as expected. You should add the device info with OS version to question. – ADM Apr 30 '18 at 06:25
  • @ADM my device is **Moto e2** sir.....i will list some device which is not working properly... – Gowthaman M Apr 30 '18 at 06:26
  • @ADM sir can you killed the app and restart the application in this case you will get again permission..can you check same device Lenovo – Gowthaman M Apr 30 '18 at 06:29
  • Already did . I also clear data of the app and even after clear data permission is there Granted. – ADM Apr 30 '18 at 06:33
  • @ADM ya its ok sir....problem is that permission is Granted even why i am getting popup likr can modify system setting permission page. – Gowthaman M Apr 30 '18 at 06:37
  • 1
    Thats the problem at your end when i tested i did not faced it . So you better all devices list in your question with details . maybe Someone will look into it having same device . Chances are good huh .. – ADM Apr 30 '18 at 06:42

1 Answers1

0

Finally there is no solution for this

Its based on device hardware issues..i check share it application even it's asking two time permission.

Gowthaman M
  • 8,057
  • 8
  • 35
  • 54