Page 1 of 1

sound works on pc but not on android.

Posted: Sun Jul 06, 2014 6:39 pm
by TubooBokBok
Hi. I have buttons that play a sound when clicked using the code play "pop.wav". I have imported the sound as a control and have copied the sound into the standalone application settings.

The sound plays on my pc but when I test the app on my android phone sounds wont play. Do I need to run the sound through special file paths?

Help is greatly appreciated.

Re: sound works on pc but not on android.

Posted: Sun Jul 06, 2014 6:44 pm
by sefrojones
Check out the specialfolderpath function in the dictionary. Specifically the note about android:
Android Note: An Android application is installed on the phone in the form of its zip package. This means that any assets that are included are not available as discrete files in the native filesystem. In order to manage this the engine essentially 'virtualizes' the asset files you include, allowing (read-only) manipulation with all the standard LiveCode file and folder handling syntax. To access the assets you have included within your application, use filenames relative to specialFolderPath ("engine").


Here is a link to a tutorial that is a bit more in depth than the dictionary entry:

http://livecode.byu.edu/audio/audioplayback-mobile.php


--Sefro

Re: sound works on pc but not on android.

Posted: Sun Jul 06, 2014 7:40 pm
by TubooBokBok
Thank you very much. I have it working now :D