Soundrecorder not working properly

i tried with taifuns aia… still not working… check…soundrecorder.aia (2.1 KB)

1 Like

Are you using Android 10

1 Like

No need to post your aia. Just post your blocks (In blockeditor rightclick and create png)

1 Like

… yes android 10… Can you try and see if it works for you?

1 Like

can you use sound component or exo player instead player

2 Likes

Your blocks are all ok. There is probably a permission problem with Android 10. Try to save your soundfiles in the ASD ( Application Specific Directory)
More infos here: Private & app-specific directory - permissions

2 Likes

soundrecorder1.aia (7.8 KB)

3 Likes

Great! this works!. Will it work for all versions? Also will it work after Kodular use the AndroidX libs ?

Sure! What I know of it’s not bound to AndroidX…

1 Like

This has nothing to do with Android 10 (or any any other version).
The Soundrecoder component uses the absolute path:

/storage/emulated/0/Kodular/mySound.3gp

and you have set the relative path: /Kodular/mySound.3gp (in the Designer).

And this has also nothing to do with AndroidX libs, but with → Scoped Storage (when Kodular targets API 30 (Android 11) → Aug 2021.

Btw, here is the extension, that Boban has used for the ASD:

2 Likes

kewl… it keeps /storage/emulated/0/Kodular/mySound.3gp as source. is it?

Record Yes, Play No at least not on my device…That’s why I used your extension.

It comes like that from Taifuns example…

Which Android version?

Android version 10

For me it’s working fine on Android 9-11.

Try this: file:///storage/emulated/0/Kodular/mySound.3gp

grafik

2 Likes

Its working safe for me with ASD extension ( both record and play ). Few questions though

  1. can we change the kodular directory? how to do that
  2. will this work for all android versions…

I’ll answer your question, but tell me first if it works on your device with one of these paths:

/storage/emulated/0/Kodular/mySound.3gp
and / or
file:///storage/emulated/0/Kodular/mySound.3gp

/storage/emulated/0/Kodular/mySound.3gp - works
file:///storage/emulated/0/Kodular/mySound.3gp - doesnt work

  1. Yes, but from Aug 2021 you have to use the ASD (for new apps).