Search docs/

Native Ringtones

The plugin helps get the native ringtones list on Android or IOS devices. And you can also use this plugin to play or stop the native ringtones and custom ringtones(added in the www folder).

https://github.com/TongZhangzt/cordova-plugin-native-ringtones

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 cordova-plugin-native-ringtonesnpm install @ionic-native/native-ringtones
Ionic Native 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
  • iOS

Usage

import { NativeRingtones } from '@ionic-native/native-ringtones/ngx';


constructor(private ringtones: NativeRingtones) { }

...
this.ringtones.getRingtone().then((ringtones) => { console.log(ringtones); });

this.ringtones.playRingtone('assets/ringtones/sound_1.caf');

this.ringtones.stopRingtone('assets/ringtones/sound_1.caf');