2.0.0 • Published 7 years ago

ringtonepicker v2.0.0

Weekly downloads
2
License
Apache 2.0 Licens...
Repository
github
Last release
7 years ago

#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.