I just tried it. It doesn't work. But how come when I answer "No" to the first system permission dialog, my app then goes to "PermissionDenied" and when I input "Yes" to the system permission dialog that appears again, I can go to the "PermissionGranted" procedure, and everything work fine from there ?
Hi Anthony, I had similar trouble with grant permissions, I add a component call file you will find it in STORAGE components, drag and drop it to you app.
When you press Accept it works perfectly, you will see it gives permision to read and write automatically.
The thing is to handle error 908 when you press deny for second time.
By removing components one by one from my project, I found that the one that causes the trouble is the "canvas" component. Below is my new testing app "Test.aia" in which a "canvas" component is added, and the "Permission granted" message is not shown after a "Yes" input to the system dialog for permission. Everything becomes normal after the "canvas" component is removed.
In order to say that "Test.aia" works, you might have to make an apk file and then installed it into your phone and also see my message "Permission granted" after "Yes" is input for the system dialog for permission.
It doesn't work on my Samsung, Sony & Xiaomi with android 10, 9 & 7 installed.
What are we talking about here? Now you have posted a new Test.aia with a canvas component. What for? The file component has already inserted WRITE permission in the Manifest, so that the APK works. You are wasting our time. As I said, show some screenshots of what's going on on your devices.
Don't be angry. I am sorry that you think that "I am wasting your time", but I am not. I still remember that you are the one who taught me how to run offline version a year ago, and I still have a lot of thanks for you. OK, let me get this straight. Below is the message I am supposed to see after System Permission, but I didn't see it in all my testings on all my phones:
Once I removed the "canvas" component, the message pops up immediately. And this is the bug that blocks my app running because the statements inside the "PermissionGranted" procedure are not executed.
Ok, now it's more clear. Yes, the Screen.PermissionGranted event is no longer triggered with the last AI2 release (nb184). It works with nb183c and also with Kodular. @ewpatton might clarify it.
Bluetooth LE is broken for me the same as Sinieer after a recent Android 10 update, or perhaps an ai2 update. Either way, my same apps compiled newly don't show the Bluetooth devices anymore. I'm on a galaxy note 9. I've tried adding ask for permission and the android.hardware.bluetooth_le line but regardless of what we add in ai2, permissions are denied to Bluetooth or something now with these update changes and BLE is unusable for me now. It's broken my progress.
.......
"
Ok, now it's more clear. Yes, the Screen.PermissionGranted event is no longer triggered with the last AI2 release (nb184). It works with nb183c and also with Kodular. @ewpatton might clarify it."
I think the problem has now been identified quite clearly.
We still have to wait for a solution (bugfix). (Or use nb183c offline version - but only for updates.)
I don't know if it helps, but I think the problem started here, I use canvas to create some folders and check if I can continue or not, and since version 184 I'm not getting it, I'll try to install offline again
is creating the directory now, but it is not creating the file, I believe that it is not even reading, because in my application, I need to read a file, I put the file manually with content and it did not read
I exported my project to Kodular and it is working normally