ringtonepicker
v2.0.0
Published
Ringtone Picker plugin for Cordova 3.X that returns list of available ringtones.
Downloads
2
Maintainers
Readme
#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.