I finally managed to get it to work!
First, I initialized the sound file, finding the full path to Android, using the @Sarim Sidd help provided, and then preloading the audio file:
//INITIALISE SOUND if(device.platform === "Android") //DIFFERENT PATH FOR ANDROID { //navigator.notification.beep(1); var path = window.location.pathname; path = path.substr( path, path.length - 10 ); //strip off index.html url = 'file://'+path+"sound.ogg"; }else{ url = "sound.mp3"; } //sound = new Media(url); sound = new Media(url); sound.play(); sound.pause();
Then, when I was playing back the sound, I forcibly increased the volume (1.0) before calling the playback method. For some reason, I noticed that the sound saved in reseller mode is muted each time the application starts:
source share