Search docs/
Getting StartedPlugins

Audio Management

A Cordova plugin to manage volume of audio streams for: ring, music, notification and system. Possible ringer values for those streams are: silent, vibrate and normal.

https://github.com/clovelCed/cordova-plugin-audiomanagement

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

ionic cordova plugin add clovelced-plugin-audiomanagementnpm install @ionic-native/audio-managementnpm install clovelced-plugin-audiomanagementnpm install @ionic-native/audio-managementionic cap sync
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android

Usage

Using React?

See here.

import { AudioManagement } from '@ionic-native/audio-management/ngx';


constructor(public audioman: AudioManagement) { }

...

setAudioMode() {
 this.audioman.setAudioMode(AudioManagement.AudioMode.NORMAL)
   .then(() => {
    console.log('Device audio mode is now NORMAL');
   })
   .catch((reason) => {
     console.log(reason);
   });
}

getAudioMode() {
 this.audioman.getAudioMode()
   .then((value: AudioManagement.AudioModeReturn) => {
    console.log('Device audio mode is ' + value.label + ' (' + value.audioMode + ')');
   })
   .catch((reason) => {
     console.log(reason);
   });
}