Help with androidStartAudioPlayingInBackground()

Derek Bump derek-lcl at speedbump.io
Mon Mar 29 17:31:19 EDT 2021


That did the trick, thank you.

On 3/28/21 2:08 PM, J. Landman Gay via use-livecode wrote:
> I've seen similar issues when trying to read other file types from the 
> resources folder in an Android standalone. Try copying the file to 
> specialFolderPath("documents") and play it from there. It's likely a 
> permissions problem that I wish didn't exist.
>
> On 3/28/21 1:24 PM, Derek Bump via use-livecode wrote:
>> Hello Everyone,
>>
>> I was wondering if anyone has insight into the usage of 
>> "androidStartAudioPlayingInBackground()", or can confirm that it works?
>>
>> I setup a test stack that attempts to play a public domain MP3 using 
>> the following script but nothing plays. I receive nothing from the 
>> function, and I'm getting the following in logcat: LiveCode: JNI 
>> exception thrown when calling native method
>>
>> on mouseUp
>>     local tFile
>>     put specialFolderPath("engine") & "/" & "spring_song.mp3" into tFile
>>     if there is not a file tFile then
>>        answer "File not found:" && tFile
>>     end if
>>     put androidStartAudioPlayingInBackground(tFile) into card field 
>> "result"
>>     -- logcat: LiveCode: JNI exception thrown when calling native method
>> end mouseUp
>>
>> I've tested this build using Community 9.6.2 (rc3) and 9.0.5, on an 
>> Android 9.0 Virtual Device and a Android 9.0 phone. Same result 
>> across the board, nothing plays.
>>
>> I did test and confirm the ability to play the audio file with 
>> "mobilePlaySoundOnChannel", but I need background playback for my 
>> project to work. Also, I searched the LiveCode Quality Control site 
>> for existing bugs (no results) and searched the forum a bit.
>>
>> Does anyone have any ideas? Here is my test stack if you're willing 
>> to give it a shot on your end: 
>> https://www.speedbump.io/shared/backgroundPlayTest.minimal.zip
>>
>> Thank you in advance,
>>
>> Derek Bump
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>




More information about the use-livecode mailing list