Ionic Solved ! Audio not playing in Android 9
in android pie version i am not facing this type of problem
a sample code given:
yo can use native audio plugin to play sound
Example:
Step 1 : install NativeAudio plugin
to see more
https://ionicframework.com/docs/native/native-audio
Import in app.module.ts and page.ts where you want to play
import { NativeAudio } from ‘@ionic-native/native-audio’;
Create instace of nativeAudio plugin
private nativeAudio: NativeAudio
put code to play sound
this.nativeAudio.preloadSimple(‘uniqueId1’, ‘assets/imgs/notifications.wav’).then( function(msg){
objElement.nativeAudio.play(‘uniqueId1’).then( function(msg){
}, function(msg){
});}, function(msg){
});