Permissions help

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 ?

Truely,
Anthony

Anke,

This works for my testing app "Test.aia" because I have no file component there.

Anthony

I think we are talking about this aia.
And if you add the File component, it will work

Show a video or screenshots of your tests.

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.
file_component_for_storage_grant_permission
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.


I would like to go back and ask for permissions again.

This code, looks fine but still, when I press deny, app freezes, it does not show message and it seems it gets into an eternal loop.

Hi Anke,

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.

Test.aia (2.6 KB)

Truely,
Anthony

@Anthony_Chow

Your test.aia compiled (with canvas) worked just fine for me

Hi Tim,

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.

Truely,
Anthony

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.

And as @TIMAI2 said, it works fine with the APK.

... even on my Galaxy & Xiaomi test devices.

Hi Anke,

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.

Yours truly,
Anthony Chow

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.

Test3.aia (3.3 KB)

Built with nb183c (offline version):

Blocks

i'm in trouble too, i use or save screen to create a folder and in nb184 it's not creating, it seems to be a permission problem.
sample:

image

image

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.

Hello good Morning

do you know if the problem has been identified?

.......
"
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.)

version I don't know how to install ofline :face_with_hand_over_mouth: :cry: :cry: :cry: :cry:

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

thank you very much, sorry for the inconvenience


Remove Canvas, if you only need it for creating folders. Use instead the FileTools extension from @vknow360: FileTools : Some tools to work with files - #173 by vknow360 - Extensions - Kodular Community

see also here:

grafik

That should solve the problem.

1 Like

Save file doesn't work either

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

my guess is, you have an Android 10 device?
see the discussion here

this is because Kodular still did not implement the latest version

Taifun

Perfect