Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ALLOW button not working after update

On the devices which have installed the latest update of Android Marshmallow - that is June2016 update, when I ask for permissions, the ALLOW button is not working.

I have tested with these 2 devices:

Nexus 6p (Andoid version - 6.0.1, Build number - MTC19V)

Nexus 7 (Android version 6.0.1, Build number - MOB30M)

Both have the latest update, and when I request permissions, the dialog is shown, but I'm not able to press the ALLOW button.

Here is the code, that I use to request permissions:

public void showPermissionsDialog() {     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {         int hasWriteExternalStoragePermission = activity.checkSelfPermission(android.Manifest.permission.WRITE_EXTERNAL_STORAGE);         int hasWriteGetAccountsPermission = activity.checkSelfPermission(android.Manifest.permission.GET_ACCOUNTS);          if (hasWriteExternalStoragePermission != PackageManager.PERMISSION_GRANTED || hasWriteGetAccountsPermission != PackageManager.PERMISSION_GRANTED) {             activity.requestPermissions(new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.GET_ACCOUNTS}, MainActivity.REQUEST_CODE_ASK_PERMISSIONS);         } else {             isAllPermissionsGranted = true;         }     } else {         isAllPermissionsGranted = true;     }  }        @Override     public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {         if (requestCode == REQUEST_CODE_ASK_PERMISSIONS) {             if (grantResults.length > 0) {                 boolean isAllPermissionsGranted = true;                 for (int i = 0; i < grantResults.length; i++) {                     if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {                         isAllPermissionsGranted = false;                     }                 }                  if (isAllPermissionsGranted) {                     this.isAllPermissionsGranted = true;                 } else {                     android.widget.Toast.makeText(this, "Please, grand permissions", android.widget.Toast.LENGTH_LONG).show();                     showPermissionsDialog();                 }             }         }     } 

Any suggestions on how to fix this? Thanks in advance!

EDIT

Here is the bug report to Google. We're still waiting for the fix from Google.

EDIT 1

This issue has been fixed!

like image 263
Helen Hakobyan Avatar asked Jun 15 '16 07:06

Helen Hakobyan


People also ask

Where is the allow button on Security and Privacy on Mac?

Go to Apple menu > System Preferences... > Security & Privacy > Click the Allow button.

Why won't my Mac let me open System Preferences?

Quick Fixes for Mac System Preferences not respondingForce restart Mac. Delete Preferences plist file. Run Disk Utility First Aid. Restart Mac in Safe Mode.

How do I allow apps to load extensions on Mac?

Select "Security & Privacy" from the "System Preferences" window. Select the "General" tab, and select the lock in the lower left corner to allow changes. Enter your computer username and password, then select "Unlock." In the "Allow apps downloaded from:" section, select the radio button to the left of "Anywhere."

How do you unlock the Preferences on a Mac?

To change these preferences on your Mac, choose Apple menu > System Preferences, click Security & Privacy , then click General. Note: If the lock at the bottom left of the pane is locked , click it to unlock the preference pane.


1 Answers

EDIT: It has been marked as a defect in the last android and it will be fix in a future release of the OS. Bug report

EDIT 2: File manager email me that they fix this feature in their app. I have not try File Manager anymore, but if you update the app it should not give you this problem anymore. But basically this behavior, could be from any app doing overlay in a wrong way until android fix it.

I finally got it (at least in my case)... its the f**** File Manager app's service. If its service is stopped, the permissions work again.

https://play.google.com/store/apps/details?id=com.rhmsoft.fm

I had this app before the update to "MOB30M" and the runtime permissions where working without a problem (is my daily job to program this) and i have been using the file manager to put the release APK inside the phone and run it to install the APK. So is not some app that I installed today.

What I fund awful is that one app can make crash all the permission system.

It's and overly problem

I understand that the permission system is not being crashed, since an app could be used to falsify the dialogs, BUT shouldn’t then Android (Google) tell you that you have an app that is running on the top and that if you want to give permissions to the app you should uninstall XXXX app? I mean for the sake of the User Experience.

A normal user, would think that his phone is broken and probably would send the phone back to google or the carrier xD

Come on, let's be honest, cant android make this better? Is not like you need your phone rooted to have this behavior (my phone is not rooted). If you dont inform the user what's going on, then is like is broken

like image 183
Javier Vieira Avatar answered Sep 24 '22 01:09

Javier Vieira