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

BlackBerry® World™ Development

Posts: 32
Registered: ‎02-22-2011
My Device: Not Specified

How to give permissions to black berry app for sending sms

Hi to all,

              Hope you all will be fine. I am new to BB development. This is my first BB app.Actually i wrote a very simple code for sending SMS from Black berry. I have to made an application that  will use sending sms. So first i wrote a basic application for testing. Although i have written the application but it requires permissions. I read this



     * In order to send messages, your application will need to declare appropriate
     * permissions within its JAD or manifest.In order to run this code on device , we will
     * need to include the following permissions
     * javax.microedition.io.Connector.sms  : Required to open an sms connection
     * javax.wireless.messaging.sms.send    : required to send the actual SMS message
     * The full permission directive will look like the following, with any other
     * required permissions also added.
     * MIDlet-Permissions : javax.microedition.io.Connector.sms,
     * javax.wireless.messaging.sms.send
     * If you fail to declare these permissions, users will still be able to install and run
     * the app, but a SecurityException will be thrown when you try to use Sms.



My question is my app is not a MIDlet, it is a native black berry app extend from UiApplication. Is my app still required these permissions?

Second i am using  Black Berry java plugin for eclipse. How can i set permissions using this IDE. Where can i set permission(means by writing code or by using interface, like go to project properties and set permissions etc)?

Third how can i test my application on real device after getting permissions. I compiled my code using BlackBerry JRE 4.6.1. I have other JREs too but right now i compiled mo code on 4.6.1


I didn't install my app on real device. I simply made an interface in which you can write number and message, and then gave a menu command "send" on which when you  click, the send sms function invoke which simple takes number and msg from EditFields.