Cordova-plugin-media not working on android 5.0.x

i am using ionic cordova-plugin-media with below commands:

 ionic cordova plugin add cordova-plugin-media
 npm install --save @ionic-native/media

my code is working fine on all devices except for devices with android 5.0.x.
The Media instance is initializing, sound is recording but i’m unable to play it.
is there any workaround to this issue ?

1 Like

hi all

Any suggestions ? I’m really stuck at this issue.

Hi, We’re having the same issue, I’m going to try some other versions of the plugin on an emulator, let me know if you find a solution. I’ll keep you updated.

yes, i’ll let you know for sure if i find any solution.

hi @maxdwvd, have you guys found any solution for this ?

Hi all, after putting in a lot of time, i found a solution to this issue:
1-Remove the already installed media plugin from your project:
ionic cordova plugin remove cordova-plugin-media
npm uninstall @ionic-native/media
2-run the following commands:
cordova platform remove android
cordova platform add android@5.0.0
3-install the media plugin:
ionic cordova plugin add cordova-plugin-media
npm install @ionic-native/media

1 Like

Hi, thanks for the response. Turns out it was another issue we had. Apparently croswalk was accidentally added to the app store build. Strangely crosswalk was breaking media playback on newer android versions, whereas it still worked on 4.4 and earlier. We found this out yesterday.

1 Like