◐ Shell
clean mode source ↗

requestPermission() function is broken

The following code:

color bckColor = #EA6411; 

void setup() {
  fullScreen();
  requestPermission("android.permission.READ_EXTERNAL_STORAGE", "handlePermission");
}

void draw() {
  background(bckColor);
}

void handlePermission(boolean granted) {
  if (granted) bckColor = #58EA11; 
}

should open a dialog for the user to grant read access to external storage, but no dialog is shown.