I am not able to get rid of the security exception when i test it in the nokia E71x phone i.e i get result is false. I tested my below code in netbeans with Nokia S40 6th edition sdk and it works fine meaning i get the value of result as true when a message is sent .
when the send button is clicked a new thread is started in the commandAction method and in the run method sendSms is called which returns true if message is sent or false from the catch block . Please help me understand what is the problem here ???
Vijay Dogra wrote:Have you mentioned the permissions required in your file?
This is my manifest.mf file inside my jar file that i try to install in my nokia phone which is on a US carrier .
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0_23-b04 (Sun Microsystems Inc.)
MIDlet-1: How To SendTextSMSMidlet, , HowToSendTextSMSMidlet
MIDlet-Permissions: javax.wireless.messaging.sms.send, javax.wireless.
MIDlet-Name: How To SendTextSMSMidlet
I have just added the extra receive permission although it is not needed in this case . when i test the code in an nokia s40 emulator, i get result = true (Please interpret this meaning from the code ) . I then install the jar in my phone(E71) and it shows the form . I enter the phone number and a message and press send and the result is false which means the message is not getting sent !!! it seems to me an issue of app-signing or a case of handsets here in US which are locked or deny me access to basic sms sending features of j2me apps.
Vijay Dogra wrote:Hi Sanjay,
Can you please try to set the settings of installed application on your phone (Options->Application Access).
If this even doesnt help, then you have to sign your application before installing it to the real device.
I could not find that i.e Options-> Application access .
I think in USA the carriers like AT&T that i am using gives us locked phones (I am guessing!!!) which is why we can install our apps but not be able to use wireless api's .
I want to simulate over an emulator now instead of in a phone....so i have a different problem and will start a new thread !!! Thanks to vijay