• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sms app gives security exception

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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 ???


 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you mentioned the permissions required in your file?
 
sanjay ramaswamy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 .

Manifest-Version: 1.0
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.
messaging.sms.receive
MIDlet-Vendor: Vendor
MIDlet-Name: How To SendTextSMSMidlet
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0

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
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you replace System.out.println with Dialog that shows. Then it would be clear as to what SecurityException (if at all this is the case) is raised.
 
Vijay Dogra
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

VJ
 
sanjay ramaswamy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

VJ



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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic