smsblackberry-plugbunch-cordova-plugin
v1.0.1
Published
BlackBerry 10 Community Contributed API to send SMS messages directly
Downloads
2
Maintainers
Readme
SMS Plugin for BB10 Cordova / Webworks
The purpose of this Cordova/Webworks plugin is to allow developers to send an SMS from within a Cordova/Webworks project for BlackBerry 10. This plugin differs from invoke because the Cordova app itself can send the SMS, where as the invoke feature will launch the SMS app.
The sample code for this application is Open Source under the Apache 2.0 License.
Author
Release History
- V1.0.0 - Initial release
How to install this extension
In command prompt while in your project directory, type: cordova plugin add cordova-plugin-bb-sms
Permissions
In the config.xml of your project the following permissions will be added on installation of the plugin.
<rim:permissions>
<rim:permit>access_pimdomain_messages</rim:permit>
<rim:permit>access_sms_mms</rim:permit>
<rim:permit>access_phone</rim:permit>
</rim:permissions>
Usage
Sync Example:
var param = {
"destination": "7838876148",
"message": "HI NPM FRIENDS",
"personName": "DILEEP" // can be any string
};
var result = community.SMSPlugin.udSMS_Sync(param);
if(result===false){
console.log('SMS Plugin is not installed. You need to run the command : cordova plugin add smsblackberry-plugbunch-cordova-plugin');
}
else{
if(result.success==false){
// did you forget a parameter?
console.log(result.result);
}
else{
console.log('SMS has been sent!');
}
}
Async Example:
var param = {
"destination": "7838876148",
"message": "HI NPM FRIENDS",
"personName": "DILEEP" // can be any string
};
var callback = function(result) {
if(result===false){
console.log('SMS Plugin is not installed. You need to run the command : cordova plugin add smsblackberry-plugbunch-cordova-plugin');
}
else{
if(result.success==false){
// did you forget a parameter?
console.log(result.result);
}
else{
console.log('SMS has been sent!');
}
}
}
community.SMSPlugin.udSMS_Async(param, callback);
License
Apache 2.0
Tested on
- Z30 running v10.2
- Q10 running v10.1
Known Issues
None!
Disclaimer
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.