title: Ionic native-audio doesn't work on android
body: <p>I'm having a problem to use the native-audio cordova plugin with ionic. I installed native using npm</p>
  
  <pre><code>sudo npm install --save @ionic-native/native-audio
  </code></pre>
  
  <p>And added a new provider called smartAudio (code attached below).
  It works like a charm both in ionic's web view and on iOS emulator/real device as well.. but for some reason there's no sound on android emulators/real devices at all. </p>
  
  <p>I have an ion-slides element that generate images slide using *ngFor, like this -</p>
  
  <pre><code>&lt;ion-slides (ionSlideDidChange)="muteAnimalSound()" pager dir="rtl" [loop]="true" &gt;
    &lt;ion-slide *ngFor="let slide of animals_slides; let i = index" style="background-color: white"&gt;
      &lt;img src="{{slide.img_url}}" (click)="playAnimalSound($event)"&gt;
      &lt;/ion-slide&gt;
    &lt;/ion-slides&gt;
  </code></pre>
  
  <p>Where playAnimalSound() function looks like this -</p>
  
  <pre><code>playAnimalSound(ev) {
      let animalSound = this.getAnimalBySource(ev.target.src);
      let currentIndex = this.slides.getActiveIndex();
  
      this.smartAudio.preload(currentIndex, animalSound[0].sound_url);
      this.smartAudio.play(currentIndex);
    }
  </code></pre>
  
  <p>My smartAudio provider was is defined like this -</p>
  
  <pre><code>export class SmartAudio {
  
      audioType: string = 'html5';
      sounds: any = [];
  
      constructor(public nativeAudio: NativeAudio, platform: Platform) {
  
          if(platform.is('cordova')){
              this.audioType = 'native';
          }
          //testing atlassian sourcetree
  
      }
  
      preload(key, asset) {
  
          if(this.audioType === 'html5'){
  
              let audio = {
                  key: key,
                  asset: asset,
                  type: 'html5'
              };
  
              this.sounds.push(audio);
  
          } else {
  
              this.nativeAudio.preloadSimple(key, asset);
  
              let audio = {
                  key: key,
                  asset: key,
                  type: 'native'
              };
  
              this.sounds.push(audio);
          }       
  
      }
  
      play(key){
  
          let audio = this.sounds.find((sound) =&gt; {
              return sound.key === key;
          });
  
          if(audio.type === 'html5'){
  
              let audioAsset = new Audio(audio.asset);
              audioAsset.play();
  
          } else {
  
              this.nativeAudio.play(audio.asset).then((res) =&gt; {
                  console.log(res);
              }, (err) =&gt; {
                  console.log(err);
              });
  
          }
  
      }
      stop(key)
      {
          let audio = this.sounds.find((sound) =&gt; {
              return sound.key === key;
          });
  
           if(audio.type === 'html5'){
  
              let audioAsset = new Audio(audio.asset);
              audioAsset.play();
  
          } else {
  
              this.nativeAudio.stop(audio.asset).then((res) =&gt; {
                  console.log(res);
              }, (err) =&gt; {
                  console.log(err);
              });
  
          }
  
      }
  
  }
  </code></pre>