PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV Mobile 2024 → sound function does not work on mobile Android
sound function does not work on mobile Android
Iniciado por Marc Rodriguez, 30,may. 2023 10:09 - 1 respuesta
Publicado el 30,mayo 2023 - 10:09
Hello,
I'm trying to use de sound function on an android program, but it does only work on the simulator. When I use the apk on the phone it does not work. (I'm using windev mobile 27). I don't know if i'm missing something.
thanks
Miembro registrado
7 mensajes
Publicado el 13,julio 2023 - 17:14
Hi Marc,

I am assuming you are using a WAV file to create the sound? Are you including the WAV file in the list of integrated files when generating the APK?

Also when including the file in the integrated files there is no need to use a path to the WAV file.
When developing and testing in the simulator, make sure the WAV file is held in the EXE folder, then when compiling ensure the WAV file is included in the integrated files and when calling the WAV file with the Sound command simply call the WAV file by its name with no path.

For example to play beep.wav use Sound("beep.wav")

Another thing to check is the sound volume, use the VolumeModify(100,volumeMusic) command to ensure the sound volume is at a desired level.

Hope this helps :)