You need to set it before recording, e.g.:
I have setted the save path to "/storage/emulated/0/Music/" but the track is not saved .. is it possible that it is because I have an Italian phone? what can I do?
Is there a directory called Music on your phone? Use the File browsing app that is on your phone to find that directory. To save to Music, there must be a directory named Music.
So, does that directory exist on your phone Jacopo?
Maybe you have to ask for WRITE permission (with this ext.):
But couldn't you save the file to internal memory?
No, assets can only be read.
sure, both in the internal memory and in the SD there is the Music folder.
I tried, but it still doesn't work.
OK. Does the folder contain your created file?
If not, try using an absolute path instead of /storage/emulated/0/Music/ ; perhaps try file:///mnt/sdcard/Music/
Post your blocks or better the aia.
Ok, I have uploaded the current .aia file on mediafire at this link: https://www.mediafire.com/file/zj5k10r88qlumlo/CreaCanzoni.aia/file
The max. size of an aia is 10 MB in Ai2:
Or you have to use http://code.appinventor.mit.edu/ (< 50 MB).
so what should I do?
-
This are the correct blocks:
-
As I said use this server: http://code.appinventor.mit.edu/ or see here:
ok .. my mistake was that after "/ storage / emulated / 0 / Music /" I didn't write the file name. It is now saved but ... in .raw format and not .waw. After "/ storage / emulated / 0 / Music /" and after the title of the file, I also wrote ".waw" and the result was "Song.waw.raw" and .raw is the current file extension. how to do?
As I said you have to use all the blocks I have shown you (also the WavSoundRecorder.Stop
method).
After the recorder is stopped, you will see the .wav
extension (e.g.: myRecord.wav
).
Ok I solved but there is another problem. When I set the save path and at the end of the file name I write ".waw", ".waw" is part of the name of the song. Then the song is saved without any extension. how can I do?
Unclear, explain in more detail, examples, ...
ok i had written waw instead of wav😅sorry really. The audio quality is really better and now my app works !! One last question: is there a component that can recognize if headphones have been inserted into the mobile phone or not?
if you are looking for an extension you always can do a search in the extensions directory yourself here App Inventor Extensions | Pura Vida Apps
see for example
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.