Sunday, January 09, 2022

problem with audio recording and or upload in Android app

Excerpts from a conversation about an Android app under development and testing - 

You had reported that 2 out of the 20 devices tested had issues with the SainIn app audio recording + uploading.

We verified that the permissions for the app were correctly set.

We wanted to check if mp3 encoder is installed, maybe you could try installing https://play.google.com/store/apps/details?id=net.mp3.codec.pack&hl=en&gl=US which seems to have an option for "broken codec detection." 

Or maybe install this app -
https://play.google.com/store/apps/details?id=com.github.khangnt.mcp
which has mp3 encoder (for recording), while the other link above is only mp3 decoder (for playback).

But after installing this encoder app also, our app did not record.

Since one of the devices was a Moto E, which is known for not having mp3 codecs from the factory, I thought of looking at the Android spec to see which codecs can be reliably used -
https://developer.android.com/guide/topics/media/media-formats

Apparently AAC LC codec Encoder is available. 

There is a simple recorder app at
https://github.com/TannerGabriel/android-sound-recorder

which I built and sent to you, and which worked. 

There, the AAC encoder is being called, and output format is mp3. Relevant code seems to be at this location.


No comments:

Post a Comment