List of usage examples for org.apache.cordova AudioPlayer destroy
public void destroy()
From source file:com.candygram.media.AudioHandler.java
License:Apache License
/** * Stop all audio players and recorders. *///w ww . j a v a 2 s .c om public void onDestroy() { if (!players.isEmpty()) { onLastPlayerReleased(); } for (AudioPlayer audio : this.players.values()) { audio.destroy(); } this.players.clear(); }
From source file:com.candygram.media.AudioHandler.java
License:Apache License
/** * Release the audio player instance to save memory. * @param id The id of the audio player *///from w w w . j a v a 2s.c o m private boolean release(String id) { AudioPlayer audio = players.remove(id); if (audio == null) { return false; } if (players.isEmpty()) { onLastPlayerReleased(); } audio.destroy(); return true; }