I created a simple application to record an audio and then store it in clouddb in base64.
until some time ago I was able to retrieve the content from the clouddb.
Now when I launch the command to recall the saved audio I get the following message: cloud db error: no such file or directory
While I correctly retrieve the value of numeric or textual tags.
Anke
January 17, 2022, 5:34pm
2
You can no longer save a file in the root dir or an arbitrary folder of the external storage (on Android 11+).
Save it in one of the Shared folders.
See also here:
From an Android point of view there are an β Internal Storage and an β External Storage .
1. Internal Storage
The Internal Storage can only be accessed with a rooted device.
1.1 The app package is saved in
/data/data/<packageName>/
In order to be able to debug your app, AI2 saves the assets for β Companion on devices with
Android β₯ 10 (API β₯ 29):
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/assets/
Android < 10 :
/storage/emulated/0/Android/data/edu.mitβ¦
1 Like
TIMAI2
January 17, 2022, 5:34pm
3
Namias_Studio_Fedele:
until some time ago
When ?
What has happened since? New phone, new android version?
Did you check that a sound file is created ?
Have you tried encoding to base64 then uploading to cloudDB (you may need to decode when you download the recording) ?
3 months ago.
I use the "Download" folder and the file is created both in mp3 format and in
wav format.
on clouddb the record is present in base64. I attach image
Thanks for the link, I had already studied it.
Saving the file locally in the "Download" folder is successful.
Saving to clouddb is successful.
When I get the record from the clouddb I get the error. I attach image.
TIMAI2
January 19, 2022, 9:22am
7
Really - how do you do that ?
What size are the mp3/wav files? (Shouldn't make any difference other than the time taken to upload/download)
Good to see you are running your own redis server
When I get a chance, I will run a test on my cloudDB, see if I get the same problem...
Anke
January 19, 2022, 9:28am
8
No , as I said, the format is always 3gp (regardless of the chosen extension, wav, mp3, ...).
Yes you are right.
I have now replaced with this extension: GitHub - G10DRAS/WavSoundRecorderExtension: Wav Sound Recorder Extension for App Inventor 2
The file is successfully saved locally and in clouddb.
But in the recovery I get error.
WAVSoundRecorder_copia (1).aia (286.5 KB)
TIMAI2
January 19, 2022, 10:36am
10
Looking at your blocks, you probably need to simplify to test the functionality.
Make a test app where all you do is upload and download a sound file.
Does that work ?
If so, the issue lies in your blocks construction.
TIMAI2
January 19, 2022, 11:03am
11
Progress - of sorts...
I have just run a test on my redis server and get the same error!
Now to test a few other things...
TIMAI2
January 19, 2022, 11:23am
12
OK.
Tested with an image, this also fails.
Tested using the MIT cloudDB server, this also fails
Could be an issue with the MIT CloudDB code - @jis
I previously suggested a workaround of converting the file to base64 before uploading, using @Juan_Antonio 's KIO4_Base64 extension
This works, so it is not string size causing the problem
Thanks for your tests.
I have simplified the application.
I have read the extension documentation.
I am doing something wrong in transforming the audio into a string. It generates me an empty string.
Thanks for the support. What am I doing wrong?
WAVSoundCLOUD (2).aia (60.2 KB)
TIMAI2
January 19, 2022, 1:11pm
14
Where is this:
note the advice provided by @Anke here
You can no longer save a file in the root dir or an arbitrary folder of the external storage (on Android 11+).
[grafik]
Save it in one of the Shared folders.
See also here:
SHARED FOLDER: ovvero cartella "Download"
TIMAI2
January 19, 2022, 2:47pm
17
Namias_Studio_Fedele:
"Download"
I believe you will need Screen1.properties Filescope set to Legacy for this to work (saving to Download)
If using KIO_Base64 you will need to remove /storage/emulated/0
from your global sound
file path when getting the file to convert to base64 string
should be just: /Download/REV.wav
you can use the replacement block
1 Like
Thank you @Anke @TIMAI2 .
With the FILEY extension, no problem.
The @TIMAI2 solution also works by correcting the path.
system
Closed
January 26, 2022, 2:54pm
19
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.