Audio doesn't work in Android


Hi, I’m developing a web app for kids where, when someone press on the “play” button or clicks an image, a sound is heard.

The problem is that while on browser the audio flawlessly, in Android (both emulator and device) I hear nothing.

In my code I used a simple Media plugin, eg:'assets/audio/'+this.storia.mainaudio+'.mp3')
		.then((file: MediaObject) => { = file;
			this.audioLoaded = true;

and in my browser this works perfectly.

When I press the “play” button on my emulator, I hear no sound, I get this from Logcat:

MediaFocusControl: AudioFocus requestAudioFocus() from uid/pid 10071/5359$1@96ea042 req=1 flags=0x0

When I press the Pause button , I read:
AudioPlayer: AudioPlayer Error: pausePlaying() called during invalid state: 0

(I suppose because the audio is not running)

Thanks in advance for any hint.



is, right?


Yes, it is. I’ve followed that usage and in fact it works on my browser


It looks like I can’t find the right path, I’ve tried a lot of paths but no one gave me the right result. My audio files are stored in assets/audio/, so I tried every possible interpolation:

(following this article

Still no result :frowning:


Never used this before, but “/android_asset/www/assets/audio/filename.extension” should work:


Thank you. I’ll give it a try!


Your answer solved my problem, thank you! By the way, I’ve tried your path more than a year ago, but I’ve now realized that - I don’t know why - my Ionic build doesn’t actually build a new apk file and sometimes it loads the previous version of the file (without the latest modifications I’ve done)…


Hi Folks,

What’s the path for iOS9+ assets?