0

On Android 9, the requestPermission() method does not make appear the popup where user can grant or deny access to storage

As you probably know, since Android 6 it is necessary to do explicit request for permission to use Storage, Camera and others. Air SDK 24 introduced support for this new approach, through the requestPermission() method available in some classess (File for STORAGE permissiong, CameraRoll for CAMERA permission, ...) Today I've discovered that the requestPermissiong() method in Android 9 does not popup the dialog windows where user is asked to accept or refuse authorization for STORAGE. I don't know if the same problem is in Android 8 and 8.1. For sure it works in Android 6 and 7 (I've tested it)

var file:File= File.applicationStorageDirectory

file.requestPermission()

In Android 6 and 7 (maybe aldo 8, I don't know) the code above popup the dialog windows where user can accept/refuse authorization to use storage. In Android 9 nothing happens (the popup is not displayed) NOTE: I'm using the latest Air SDK 32

garda86
  • 11
  • 1

1 Answers1

1

I would suggest using a permissions ANE for better results. The AS3 was never reliable enough to use in apps. myflashlabs and distriqt, both offer solutions which work in any version.

leokan
  • 662
  • 5
  • 22