Try using Legacy instead of Shared ?
The issue is not related to path. I could easily export to Shared using StorageAccess extension. I think my TinyDB data is corrupted at some point and the extension isn't able to convert it into JSON. When I use "Wipedata" block, I can still export the empty file. I thought if we could ignore the error and share the file, I could open it and try to analyze what is missing in the output and change the blocks accordingly.
What does the block
show you?
On companion, I tried wiping, added some items to a tag and called the GetEntries. It shows the tag and its content correctly. But still get the same issue. I will try removing extensions one by one to see which one causes problems. Thank you
I know what the problem is. According to standard App Inventor convention (what TinyDB follows), any value before it is stored and retrieved, it must be serialized to a String and deserialized from the same String.
But this convention is not followed by many extensions, many of them ignores this serialization step and for e.g. they directly store an Integer.
This extension expects a serialized string value, but get a raw int instead.
But I only use TinyDB to store values to TinyDB. Why would other extensions interfere with this?
Can you list the extensions you use in your project?
- TableViewer
- DrawerMenu
- BottomNavigation
- StorageAccess
- MaterialDialog
- UrsAI2Popup
- TaifunFile
When I export only a single namespace (TinyDB1 which I use to store my data), I get the json file without any problems. I guess other components create their own namespaces and one of them causes this problem.
Hi, i'm quite new to App Inventor. I was trying to use the ETinyDB extension to export mi database to a json file on my device. I downloaded the .aix file and imported it to extensions. But whenever i get to the screen in which i wan't to click export data, i get this error.
Are you testing with companion app ?
yes
There are currently issues with the companion app.
Try with a compiled app, or you can try with this updated companion:
You will get a warning that ai2
doesn't know about version 2.73d1u , just click the not now button
and all should be well.
Worked, thanks!
Btw, will it be possible to export the file on my Galaxy A34? I'm getting java.io.IOException: Read-only file system
Export it, where ?
Where have you saved the file ?
I have tried to save the file in /Downloads, but got read-only errors. Isn't it possible to save in this directory, or should i give permissions somehow to the app
Looks like you need to provide a filename, and I will have to look at the extension to see where it saves by default, you may need to provide an absolute or full path...
Yes, these blocks will save to your ASD:
so for the Download directory try:
file:///storage/emulated/0/Download/filename.txt
Is a file needed? Can't I save it directly as a json with call EtinyDB1.Export?
You want to store the output in a variable or send it somewhere?
then use this block