mobilePlaySoundOnChannel bug?

Peter Reid preid at
Sat Nov 4 13:12:20 EDT 2017

I'm using LC 9.0.0-dp10 on a Mac to develop an app for an Android/Amazon Fire 7 tablet (FireOS 5.1.x). As the app launches it prompts the user to select a set of files from the microSD card plugged into the tablet. The selected set of files are copied to the specialFolderPath("documents") area.  Some of these files are short sound clips that are played using the mobilePlaySoundOnChannel command. As and when required the user can trigger the initial prompt to select a different set of files from the microSD card.

If the user repeatedly chooses different sets of files, the app is OK as long as the mobilePlaySoundOnChannel is not run.  However, any use of this command leads to a filing system error! If I try to create new folders in the app having run the mobilePlaySoundOnChannel command, I get an error where the creation date of the new folder is January 1970 and I can't create files within such a folder. I end up having to close and re-open the app for it to work again.

With the mobilePlaySoundOnChannel command commented-out, the app runs fine (apart from the missing sound), with the user able to change sets of files as often as they want. With the mobilePlaySoundOnChannel command active, the app is OK until the user changes the set of files.  From then onwards 1 of the key folders has the above problem.  The files/folders are as follows:


The only folder affected by the error is "sounds", all the other folders and files are created OK (as copies from the SD card). I've tried renaming "sounds" to "audio" and "audioClips", but it's always this folder with WAV files in it.

I've spent many hours chasing this problem, thinking it was an Android filing system issue. Only after thinking differently did I investigate and discover an absolute reproducible association with the mobilePlaySoundOnChannel command!

I found a previous bug report that may be relevant, which implies the problem was in LC 8.x.x and has been fixed. So I thought I'd try my app with LC 8.1.7 STABLE.  Unfortunately my app requires an add-on developed by Ali LLoyd - Android Audio Recording which I can't get to compile within LC 8.1.7!! The specific compilation errors are:

	5:03 PM: Error: on line 25 ():
	5:03 PM: Error: on line 27 ():
	5:03 PM: Error: /Users/peter/Documents/Android Audio Recordings/Android Audio Recordings
	v3/androidaudiorecorder.lcb:25:1: error: Unable to find imported module ''

	/Users/peter/Documents/Android Audio Recordings/Android Audio Recordings v3/androidaudiorecorder.lcb:27:7:
	error: Parsing error: syntax error

and I've no idea how to fix this!?

So, please can anyone either advise me how to work around the apparent mobilePlaySoundOnChannel command bug in LC 9 or advise me how I can fix the compilation error to try my app with LC 8.1.7?

Thanks for any help and thanks to others for related help given previously - I intend to summarise the collected solutions once I've got past this current show stopper.

Peter Reid
Loughborough, UK

More information about the use-livecode mailing list