Working only on companion

when exactly do you get the error?

after picking a pdf to display it?
if yes, then how does an example of your file_path look like?
Unbenannt

btw. are you aware, that you can get a “nice” screenshot of your blocks?
just right click onto the blocks editor background and select “Download blocks as image”…

Taifun

4 Likes

no i get error when screen initilizes.

which data base You are using.

i am using google drive to store file whose direct download link is in airtable.

i guess you have to use webview to show pdf online @quteboy4

Actually its trying to open pdf which are already downloaded for google drive. And error is on initilizing screen not on item clicked.

Is your permissions granted?

/Boban

you can do the following things:

yes permission was not granted.Is this the correct way of asking permission?blocks%20(1)

You need to ask for “WRITE_EXTERNAL_STORAGE”, after that permission has been granted, you also are able to READ…

/Boban


Its showing this?

the permission must be granted manually by going to setting

Why? can’t we ask user for permission in app?

Android Restriction, depend on android versions.
You can try asking permission from the screen1 block named “Ask for permission” and the validate the permission from the block just above it named “is permission granted”

1 Like

No.

Of course. See for instructions to get WRITE permission eg here:

and read the Description of Taifun’s File extension:

as Boban said:

… but you have to reload the screen first

1 Like

@Boban and @bodymindpower gave you some good hints…
but rather than reloading the screen just use the available events correctly…
in this case only if the permission has been granted, then get the filelist etc., which means, just move your blocks into the PemissionGranted event… you can find that event in the Screen drawer…

Taifun

But the Permission Granted event is not triggert at Screen.Initialize on the first run, so you must reload the screen.

see also my last post here:

1 Like

With AI2 that works fine, but unfortunately not with Kodular.
In addition, Permission.Granted is not only triggered once, but every time the screen is opened, see here:

1 Like

this then is a bug and should be added to the bug list by @KodularCreator
Taifun

1 Like