App will not play audio after downloading audio file-- Have you encountered this?

The Northern Thai app is on the Playstore at https://play.google.com/store/apps/details?id=lnb.nt.w.inte.aud.rg

This app was compiled with SAB 10.4

Mark audio is included in the assets of the app above and always plays reliably. The rest of the NT downloads from the FCBH Bible Brain. When a non-Mark audio file is selected for playing, the download popup opens and the file downloads and the popup closes, but the file does not play. The rotating, in process circle around the PLAY button continues indefinitely. Swiping to the chapter before and clicking the play button will repeat this behavior. Selecting a shorter audio file like Jude, seems to work correctly and after one file downloads and plays correctly some or all the chapters that previously did not play, now play OK. Also if several attempts are made to play other chapters usually after 4-5 unsuccessful attempts a file downloads and plays.

The app was tested on several phones with Android 13 and Android 10. The android 10 phone, has a slightly different response. After clicking the first non-Mark file to play, it downloads, but does not play. Selecting a 2nd chapter usually works and plays the audio, and the initial chapter that did not play, now plays OK.

Inspection of the audio file download folder shows that the app did in fact download all the files clicked. They all play normally when played in another audio player. So something in the app hesitates after the download to start playing the audio. There are no spaces in the filenames of the audio files.

A yet unpublished new version of the app compiled with SAB 11.0.2 has the same behavior.

Remedies that did not improve or change the problem behavior:

Downloading mp3 or webm files made no difference

Downloading from either the standard FCBH server or the -opus16 server made no difference.

Any combination of the downloading/streaming option, or the audio file download user option (both set in Navigation Drawer/Setting in SAB) made no difference.

If you have ideas of fixes let me know.

Thank You, Roger Green

This sounds similar to this post:

I wonder if you looked at the folder downloads what you would find. It may be good to add to this original post if similarities are found.

Yeah I saw that and noted this report. The download folder has the downloaded mp3’s. They play if I use another audio player. Once the app starts to successfully download and start playing a file, it usually works after that, but sometimes it may stall again. Hopefull Richard or Chris can find the bug. Hope you are doing well. -Roger

Roger, sorry to hear that this is happening. We certainly want this to be working well. I have tried downloading audio files for several different books in your app - and it is working for me. The files download and then start playing. So I need to find some way of reproducing the issue. Is your internet connection especially fast or slow?

Dear Richard,

Thanks for your help with the app. The current version 10.4 on the playstore does not have this issue. You need to use the 11.0.2 apk or create an app from build files.

I tried a RealMe phone today with Android 12 and the apk works perfectly. But reinstalling the same apk on my Samsung S20 with Android 13 still had the problem behavior.

Even though I tested both the FCBH servers: NODWBTN1DA and NODWBTN1DA-opus, earlier this week, and both had the issue, Today I switched back to NODWBTN1DA, and now the app works correctly on my Samsung Android 13, and the Xiomi with And. 10. The only other thing I changed was the download directory name. It was “Nothern Thai audio”, and I changed it “Northern_Thai_audio” Initially this did not make any difference, but I’m wondering if there was some conflict since there is an unused source (non-default) and it had a difference download folder. I changed both to “Northern_Thai_audio”

If I rebuild the app sometimes it has the issue and sometimes it is ok. So perhaps it is affected by internet bandwidth. The ISP I use at home seems more stable than the one at our SIL center where I first encountered the issue.

Our internet bandwidth is usually at least 100 Mb/sec. Can be 200 Mb. I tried building and running the app with and without a VPN/USA, but this did not seem to make any difference. It seems like something is keeping the app from initializing playback once the download finishes.

I appreciate any further testing you do of the app. If I get consistently good builds I can publish the update.

Roger

I discovered that if the app has downloaded a chapter of an audio file, if the app is then uninstalled and reinstalled, and the app is opened to a chapter that has already been downloaded during the last install, then when the play button is pressed, after going through the download permission popup box, the PLAY button starts circling.

If I delete all the audio previously downloaded and reinstall the app, then any file will download correctly. But if I then reinstall the app, those chapters already downloaded will not play.

I was not previously checking what audio files were being stored, so this was the problem I was encountering earlier. So the remedy needed is to change the app so it will play audio already in the download folder.

I hope you will be able to duplicate this issue now.

Roger

I downloaded the app from play store following the link you sent and the app played well. Everything went well. I think it has to do with the phone you’re using.
I also did a song book in my Igala dialect, it never plays on my phone but it plays on the phone of every other person. People are enjoying it and are happy. I saw it play on people phone but since I got this new phone, it never play here and I don’t know why. But I don’t care anyway since people are happy

Thanks for testing the app. The version on the Playstore is ok, it is the next test version that has an issue. Download here
:smile:

Thanks, Roger. Yes, I can duplicate the issue in the way you describe here. I install the app, download an audio file, then uninstall the app, then try to play the same audio. It asks to download it rather than finding it, and does not play once it has been downloaded. We will look into it. Thanks again for the steps to reproduce the problem - that makes it easier to fix!

This issue has now been fixed ready for the next release. It was a permissions issue, where the app needed to ask for read permission to access audio files created by a different app (or an earlier installation of the same app).

Thanks for this Richard. Glad it was not difficult to remedy. I have also noticed the same behavior in the current version on the playstore on the first install.

Where are the downloaded audio files stored now? I put “Northern_Thai_Audio” as the download folder, but cannot find this folder anywhere on my phone or laptop.

Where are the downloaded audio files stored now? I put “Northern_Thai_Audio” as the download folder, but cannot find this folder anywhere on my phone or laptop.

Google has been changing to what extent apps can read and write files in device storage. For privacy and security reasons, we no longer have the permission to read/write files anywhere. In the most recent versions of Android, since Android 10, we need to write audio files to sub-folders of the “Music” folder. You will find your files there, in a sub-folder with the name of your app.