Is here someone who could explain to me how to get coulddb to work.
The weird thing is, that it was working on older version of appainventor. It actually does work in companion when testing. But it doesn't work after compilation to APK. Does anyone knows where the problem could be that everything is fine before compiling to APK?
Please explain "what doesn't work"....show any error messages....
Show your relevant blocks, including any that import data from files etc.
Also advise on your device android version.
It should show one number form DB and update under certain circumstances.
It works prefectly when using ai companion. After compiliing to APK it does literary nothing. No error, no anything. I am using Android 11.
Here are the blocks:
I'll have to build a test app.....
this simple app, which emulates what you appear to be doing,
works OK in companion on android 11. Once compiled, it installs OK. On first run it asks for Files and Media permission (?) which I gave. When I hit the button I get a 908 error about WRITE_EXTERNAL_STORAGE permission being needed (no option to set these in Settings). Neither permission requested or not provided do not make any sense as on the surface (to me) cloudDB does not require either of these permisssions to do its thing.
If you reinstall the apk, do you see this also at any point?
Try changing the DefaultScope property on Screen1 to Legacy instead of App and see if that helps.
Nice, that works. Thanks.
Yes, that solves the problem, but this doesn't make sense, because the only thing that is changed is that
WRITE permission is now declared in the Manifest. However, this should not have any effect as
WRITE permission is no longer available on Android 11.
Yep, setting Default Scope to Legacy fixes CloudDB for me too on Android 11.
Yes, but this makes no sense at all.
Agreed, didn't make any sense to me as cloudDB does not appear to touch the file system, however,
I'm not going there at the moment, just going with the flow until Evan & Co. get it all sorted. If we have to use Legacy for now, so be it.
Exactly, and secondly,
WRITE permission may actually have no effect on Android 11.
CloudDB is being overly conservative here by asking for permission up front. On Android Q and higher it now writes to the ASD (which doesn't need this permission), but on earlier versions it does write outside the ASD (which needs the permission). However, CloudDB is so conservative it asks for the permission even if you never use this feature. We will have to adjust the logic to handle the file system related changes properly.
Thanks for the explanation
(added to FAQ)
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.