Why is the audio not saving in the app but it does on companion?


So I'm making an audio recorder app but, I'm changing the built-in sound recorder to this sound recorder extension: https://github.com/G10DRAS/WavSoundRecorderExtension

The problem is that the path that I'm using does work, but only when using the companion, once exported and downloaded on the device, it does not asks for recording permission, and it does not save the audio file.

These are the blocks I'm using:

Here's the .aia file to see all the blocks:
AudioRec (1).aia (232.3 KB)

Thanks to anyone who would like to help me!

In the app settings, give permission for the microphone and saving files.

You can also add this block to Initialize.screen1.

Hmmm, it does work when doing it manually but, it doesn't asks for permission when the app initializes..

For me asked, but only when opening the app for the second time. I don't know why, maybe because it asked for write access the first time.

But it's ok, you have the answer which is to have the permission for the microphone, thank you!

This worked:
AudioRec (1).aia (233.0 KB)

When pressing Record and then pressing record again it should stop but it doesn't, it starts a new recording

Yes, I Yes. I made a mistake. Now is good.
AudioRec (2).aia (232.6 KB)

1 Like

Ok, it's fine thank you!

I slimmed down your app a bit. In another project, I showed you how to use the "FormatDateTime" block to create time. You haven't learned it.

AudioRec (3).aia (231.1 KB)

1 Like

OK thanks!
I was using a more complex system to make the timer when pressing record.
I didn't knew that there was a simple way.

I will someday, it's just that I haven't focused on that.

Hi TTG Studioz

Note that from Android 10 your App should store external files in it's ASD (App Specific Directory). Google introduced this as a security measure and it's checked for Google Play Store.

Yes, the upside to ASD is that you don't need write permission.

The downside is that only your app has access to the ASD. So, in theory, there will be no access to your audio recordings. I don't think anyone knows exactly how to solve it yet.

1 Like

Thank you for letting me know.
I don't use an Android 10 but if I do I will know because of you thanks :wink:

Are you making your app only for yourself? Unfortunately, we have to slowly adapt to the new rules and get used to the limitations.

Yeah, this app is only for me and to learn how to save files.

On point. So it's better to learn new methods than outdated ... :upside_down_face:

Well, you're right. I've should've learn new methods than old methods. My bad! :sweat_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.