Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Posts: 10
Registered: ‎03-21-2013
My Device: BB 8520
My Carrier: Idea Cellular
Accepted Solution

How to use SMS service in BB10?

I am trying to use SMS service in BB10 through webworks.But I always get an error "Cannot read property 'sms' of undefined" .The code I am using is :

Javascript :

blackberry.message.sms.send('hello world', '9999999999');

Config file :

<feature id="blackberry.message.sms" />

Is there any way to use the SMS service ?

Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: How to use SMS service in BB10?

You can invoke the SMS application using this line:


location.href = 'sms:99999999?body=Hello';


Bryan Higgins
BlackBerry WebWorks
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: How to use SMS service in BB10?

That API you are attempting to use is not supported in BB10 WebWorks. There is no ability to dynamically send an SMS message. As Bryan stated, you will have to invoke the SMS application, see the following documententation https://developer.blackberry.com/html5/documentation/text_messages.html. The send boolean flag will auto send the message onInvoke.