So I am working on an app, where I upload mp3 files to the app, and store them inside. However, while certain elements in the tinydb that I use for storage actually are stored, the songs I try to store are not. After looking around for a bit, I believe that it is due to a storage problem of the app itself. Is there any way I could use the phone's storage instead of the app's, therefore allowing me to save the songs? Or perhaps use one of the other options besides tinydb to get that storage? I have looked around for problems like this, but I either can't find it or they make me confused as to what was going on. Any help would be appreciated!
X_Notes_Altered.aia (56.6 KB)
Taifun
Thank you for your help! However, I have a few concerns-1, I tried looking at it, but I have next to no clue what the source is trying to tell me to do, even with the instructional video that is so blurry I can't manage to see anything. 2, I think this method is for having all of the files with the app when it is installed at the start, But I want to be able to continuously add more files over time, if possible. Same with how something like spotify would work-you find a new song, add it to your playlists, and then you can recall it at any point in time.
Both videos were uploaded as full HD videos. The first one is on YT, there you can set the quality.
Yes
Download the files and store them in ASD - application specific directory
Taifun
PS:
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...
which means in your case post a screenshot of your relevant blocks...
To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
So I went around, looking at the ASD, and found Anke's ASD downloader, so I imported that, and made a test file to mess around with it and see what works from what I saw on the forums. I got as far as I could, But I managed to get stuck. I get the error message of that it can't load the file that was imported. I know the file is downloaded, because it gives me a notification, but the song player won't run the file with the path:
your path to the ASD seems to be incorrect...
try this
Taifun
Do NOT hard-code the ASD.
@Taifun:
So I changed the path to this:
But it still had the loading error. (It might be possible I misread how to make the path, because I couldn't tell which parts were tailored for that project or not.)
@Anke: I don't understand what you mean? What is hard-coding it, how am I doing it, and how do I not do it?
This
ASD/global Song_Title
.mp3
/fileName.mp3
Changed the Song Player Source:
However, it still gives the the load error. Could there be something else that is wrong?
What abiut using Do it to check the path and find those little errors yourself?
Use the companion app and Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
Added the slash in, and the current error message is:
Error 702: Unable to prepare /storage/emulated/0/Android/data/appinventor.ai_[email].X_Notes_Test/files/[Song Title].mp3
Hmm, try to use a full path:
file:///storage/emulate/...
file://ASD/fileName.mp3
Same error again, but with the file:// at the start. Frustrating.
Show your relevant blocks (and post the aia).
use Do it to debug your blocks and show us a Do it result of the complete filename
a correct filename looks like this
file:///storage/emulated/0/Android/data/<packageName>/files/something.mp3
also it would be a good idea to avoid spaces in the filename,
alternatively replace spaces by %20 like this
Taifun