ringtonepicker

2.0.0 • Public • Published

#Cordova Ringtone Picker Plugin# Ringtone Picker is a Cordova plugin for android that returns list of available ringtones

Adding the plugin to your project

To install the plugin, use the Cordova CLI and enter the following:
cordova plugin add ringtonepicker

Platforms

  • Android

Use

Update: To show native ringtone picker, use the following code:
RingtonePicker.pickRingtone(successCallBack,errorCallBack);

successCallBack will have the URI of selected sound.
ErrorCallBack will have an integer representing following errors: 1 - User canceled operation
2 - Unknow error like returned URI was NULL

To get the list of available ringtones, use the following code:
RingtonePicker.getSoundsList(successCallBack,errorCallBack);

successCallBack will have a JSON Array of JSON Objects containing URI and name of sound.

To hide the dialog, use the following code:
RingtonePicker.playSound(soundURI);

soundURI is the URI of sound that you want to play.

Package Sidebar

Install

npm i ringtonepicker

Weekly Downloads

0

Version

2.0.0

License

Apache 2.0 License

Last publish

Collaborators

  • dpaksoni