So you see I'm tryna to upload an mp3 file manually by the user. Like when btn_upload.click then open a prompt or something, to upload a mp3 file. Thank you.
Show us your relevant blocks, and please read this:
Before you ask a question / open a new topic
please take care of the following points:
The forum was previously searched for similar topics / issues.
Give a precise (detailed) description of
the issue / bug,
the goal.
Show the (relevant) blocks (images, screenshots of blocks in high quality).
Debug your blocks (connect to Companion and right mouse click: → Do it).
Name the Android / iOS version running on your (test) device.
Do not open multiple threads on the same topic.
If you haven't al…
I mean I'm tryna to find like is there a way or something? Like I know you can upload txt files. From the file component.
And where would you like to upload the file to? You can implement a file picker with SAF.
1.Introduction
Description: Basically AI2 wrapper of Storage Access Framework. Using this extension, you can get read and/or write access to a single document or tree document (and all of its children recursively).
Latest Version: 1.3
Released: 2021-09-16T18:30:00Z (UTC)
Last Updated: 2023-11-15T18:30:00Z (UTC)
2.Blocks
[image]
[image]
[image]
[image]
[image]
[image]
[image]
[image]
[image]
3.Documentation
Events
ErrorOccurred
Event indicating error/excep…
Upload and play it with the player component
It is recommended to read this guide before you begin, because it really depends on what files, and where.
In fact, it is not at all surprising that many people have difficulties with the SoundRecorder and/or the Player component. So here is a guide on the subject.
There are numerous issues with the SoundRecorder and Player components when not saving to and playing from the ASD. I won't list them all here (just the most important). Everyone can test it themselves.
You cannot record .3gp files in the Shared folder /Music on Android 11+.
READ permission is incorrectly requested for the Player…
And this.
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…
And posts in this topic.
1 Like
Taifun
July 17, 2022, 12:48pm
10
Use the FileList method from the file extension to get a list of the mp3 files
Then use the listpicker to pick a file to play it
See also the Jukebox example there...
Taifun
3 Likes
Ah - confusion 'Upload' generally refers to putting something on the Cloud (internet). What you want to do is Load a file into your App.
system
Closed
June 14, 2023, 1:43am
13
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.