CloudDB.StoreValue Block not accepting file from Shared folder

You will with the compiled app :slight_smile:

Does this work for you?
So saving the image directly to a non-ASD folder:

grafik

grafik

Tim's code works on apk in Android 8.1 but as he mentioned requires manual Storage permission in Settings. On Android 11 the apk works without asking for permissions. :slight_smile:

The example 'works' to share the image between devices. :astonished:

I tested my blocks on Android 9 with Companion:

It does not work, as I said.
canvas2cdb_1.aia (3.3 KB)

In the subject of this thread you are talking about Shared folder... this is misleading, because the folder /Shared not realy is shared storage in the sense, Android is understanding it... it is only an arbitrary folder in the root directory of the emulated sdcard, which is called /Shared...
You might want to adjust the subject accordingly to avoid misunderstandings...

Taifun

The thread started out discussing the Shared folder that exists in the device operating system in an attempt to solve the app design. I prefer to allow developers to read all the posts to understand what I was doing (try to do). Perhaps I should have indicated not accepting file from the device folder called Shared folder . The file was moved from the Ads to 'Shared' and also to Pictures. Both locations are accessible to an Image or Label component but CloudDB can not use it at a source o valueToStore.

Developers can read your post to 'avoid misunderstandings" I believe. Thank you for your 'technical' point. :slight_smile:

Tim's potential solution how to get a Canvas image into the CloudDB does not use a folder called Shared of course.

  1. What does all this have to do with CloudDB?
  2. It doesn't work outside of ASD on any Android version (but it should).
  1. It has everything to do with CloudDB (sharing between devices)
  2. It has nothing to do with not working outside of the ASD - which you seem to be obsessed with....
  1. Then I'm curious about your explanation.
  2. Of course it does, it should and had to work there too.

Yes, my fault, it has nothing to do with it, but it doesn't work with DefaultFileScope = Legacy or Shared (at least not on Android 11+). You can ONLY choose DefaultFileScope = App or Private.

But I'm still curious how to share these images from CloudDB across apps. :thinking: :woman_shrugging:

Each device has the same app
Each user can call back the taglist (which are the tags for the images)
Then the user, selecting from the taglist, can then download the image from cloudDB to their device

Each user can generate images and upload them with a tag to the cloudDB, an updated taglist would show new images...

Alternatively, the developer can store a set of images to the cloudDB (with, say, an admin app), and these images can be downloaded to the user app for use in the app.

It would make good sense to resize images before uploading to cloudDB in order to minimise size and maximise speed.

Ok, then there was a misunderstanding because I meant/said "across apps".
Of course it should work with the same app for different users.

But the question remains: why isn't it possible for one of the Shared folders (with DefaultFileScope = Legacy or Shared)?

I believe it is to do with the location of the AppInventorBinaries folder, maybe cloudDB is expecting it to be in the ASD ? I will have a look at the source later...

Maybe it's defined here (@ #579) :thinking:

This tutorial explains how a CloudDB can share an image between devices (the 2Dice app the Share the Roll part) How to: Roll Six 🎲 and Share the Roll using a CloudDB The example does not store anything to the ASD or Shared or Pictures folders; it a demonstration of how an app using CloudDB can share information between devices that use the identical apk provided all devices are connected to the internet using WIFI or cell data .

Hope it clears up the and answers your comments regarding

Thanks, but that is / was clear to me.

Great. I just wanted to make sure.

Only MIT knows :cry: and is related to my original question.

Can't see anything in the source about AppInventorBinaries.....

Yes, it is all in there

Looks like it should expect /AppInventorBinaries to be in the default path, which, when using Legacy should be: /storage/emulated/0/AppInventorBinaries ? But Legacy will need to be set in the designer ?