×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    14

    Midlet permissions issue

    I need to access the Nokia N90's memory card file system.

    After trying to make a simple :

    FileConnection fconn = (FileConnection) Connector.open("file:///E:/Images/PlanParisPOI.JPG");


    , I had part of this exception message : Permission = javax.micro (then the phone screen's width does not allow to

    read the end
    of the content).

    Then I googled and read about midlet permissions.

    So I added permissions for javax.microedition.io.Connector,javax.microedition.io.file.FileConnection into my

    midlet's jad file.

    Unfortunately, my midlet now fails to install on the mobile phone (authorization failed).

    Here is my jad file content:

    MIDlet-Version: 1.0.0
    MIDlet-Vendor: Midlet Suite Vendor
    MIDlet-Jar-URL: MyMidlet.jar
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-1: ClientLourdSIG,,ClientLourdSIG
    MIDlet-Permissions: javax.microedition.io.Connector,javax.microedition.io.file.FileConnection
    MIDlet-Name: MyMidlet Midlet Suite


    I am using Nokia S60 sdk + eclipseME.

    Any ideas?

    cheers

  2. #2
    Registered User
    Join Date
    Nov 2006
    Posts
    14

    Re: Midlet permissions issue

    If I sign the midlet (I used the JDK keytool) then I can install the midlet on the mobile phone.

    But the same exception keeps being raised when executing the midlet.

    Any idea?

    Please help me.


    Thanks

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Midlet permissions issue

    Two permissions are defined for the Fileconnection API:
    javax.microedition.io.Connector.file.read
    javax.microedition.io.Connector.file.write

    The read permission is used when a file is open in read mode or if an InputStream is opened from a FileConnection object.
    The write permission is used to open files in write mode or if an OutputStream is opened from a FileConnection. It is also used when invoking other write operations like delete or rename.

    If you are not granted the permission to access the restricted API, a SecurityException is thrown and it is important to manage these situations in your MIDlet.

    To avoid the security/permission questions, you have to sign your midlet.

    Regards
    Gopal
    Twitter : @balagopalks
    Linkedin : @balagopalks

  4. #4
    Registered User
    Join Date
    Nov 2006
    Posts
    14

    Re: Midlet permissions issue

    Quote Originally Posted by balagopalks
    Two permissions are defined for the Fileconnection API:
    javax.microedition.io.Connector.file.read
    javax.microedition.io.Connector.file.write

    The read permission is used when a file is open in read mode or if an InputStream is opened from a FileConnection object.
    The write permission is used to open files in write mode or if an OutputStream is opened from a FileConnection. It is also used when invoking other write operations like delete or rename.

    If you are not granted the permission to access the restricted API, a SecurityException is thrown and it is important to manage these situations in your MIDlet.

    To avoid the security/permission questions, you have to sign your midlet.

    Regards
    Gopal
    Hi,

    But I have already signed my midlet and it didn't help. I also added the required permissions including javax.microedition.io.Connector.file.read and javax.microedition.io.Connector.file.write. What else should I do?

    Besides, I have also tried my program on an older Nokia N90 and it worked!
    So what could be the difference with the newer Nokia N90 that I got?

    Thanks for helping

  5. #5
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Midlet permissions issue

    Is your N90 an operator branded one? I have read that operators can set restrictions for accessing certain API's.

    Regards
    Gopal
    Twitter : @balagopalks
    Linkedin : @balagopalks

  6. #6
    Registered User
    Join Date
    Nov 2006
    Posts
    14

    Re: Midlet permissions issue

    Well, both phones belong to the same operator....

  7. #7
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Midlet permissions issue

    Please check whether the Phone software versions are also the same and also check whether an operator specific firmware is instaleld on your N90.

    Regards
    Gopal
    Twitter : @balagopalks
    Linkedin : @balagopalks

  8. #8
    Registered User
    Join Date
    Nov 2006
    Posts
    14

    Re: Midlet permissions issue

    How can I check the firmware version of the Nokia N90 mobile phone please?

    Thanks

  9. #9
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Calgary,Alberta,Canada
    Posts
    78

    Re: Midlet permissions issue

    Quote Originally Posted by barbeNoire
    I need to access the Nokia N90's memory card file system.

    After trying to make a simple :

    FileConnection fconn = (FileConnection) Connector.open("file:///E:/Images/PlanParisPOI.JPG");


    , I had part of this exception message : Permission = javax.micro (then the phone screen's width does not allow to

    read the end
    of the content).

    Then I googled and read about midlet permissions.

    So I added permissions for javax.microedition.io.Connector,javax.microedition.io.file.FileConnection into my

    midlet's jad file.

    Unfortunately, my midlet now fails to install on the mobile phone (authorization failed).

    Here is my jad file content:

    MIDlet-Version: 1.0.0
    MIDlet-Vendor: Midlet Suite Vendor
    MIDlet-Jar-URL: MyMidlet.jar
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-1: ClientLourdSIG,,ClientLourdSIG
    MIDlet-Permissions: javax.microedition.io.Connector,javax.microedition.io.file.FileConnection
    MIDlet-Name: MyMidlet Midlet Suite


    I am using Nokia S60 sdk + eclipseME.

    Any ideas?

    cheers
    I think what you need to do is this: after you install the signed application go to Tools>you app>options>suite-settings>change the last two settings to "always allowed".
    I hope this will help
    Rupinder Deol

  10. #10
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Midlet permissions issue

    barbeNoire,
    How to find our the firmware version of Nokia phone?
    press *#0000# while in the idle screen (the one you make the phone calls from)

    Is your operator Orange Israel?

    Hartti

  11. #11
    Registered User
    Join Date
    Nov 2006
    Posts
    14

    Re: Midlet permissions issue

    Quote Originally Posted by desijatt
    I think what you need to do is this: after you install the signed application go to Tools>you app>options>suite-settings>change the last two settings to "always allowed".
    I hope this will help
    Thank you so MUUUUUCHHHHHH!

    This fixed my problem.

    I even don't need to fix any permissions!!!!!

    I love you!

  12. #12
    Registered User
    Join Date
    Dec 2004
    Posts
    9

    Re: Midlet permissions issue

    I'm signing my midlet with a certificate that comes in netbeans, I'm using a N81 phone, but it gives me an error when installing the midlet. The phone doesn't like that certificate, what can I do?

  13. #13
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    camilo2255, please do not hijack threads of others. Your question might be related, however it is a separate issue. Furthermore, the provided information is a bit spare to give an correct/good answer.

    First of all, I recommend to go through this. I know this is a lot to read, however, you should really go through that. Especially the reference at the bottom should answer all other questions. I am not sure whether you understood that the certificate you are using needs its certificate authority on your phone, too. Consequently, you should go for a paid certificate like VeriSign or thawte. If you use one of those already and you have installation problems, please go through this post which contains a link to common pitfalls and how they are avoided.

Similar Threads

  1. calling midlet from midlet throws SecurityException on 6600
    By brianpegan in forum Mobile Java General
    Replies: 3
    Last Post: 2010-10-25, 05:31
  2. Nokia 6101 Locked 2 TMobile Midlet can't access internet...
    By Jason Glass in forum Mobile Java Networking & Messaging & Security
    Replies: 45
    Last Post: 2007-11-14, 02:19
  3. Trusted domain midlet doens't have permissions as Nokia granted
    By dusanbaranec in forum Mobile Java General
    Replies: 22
    Last Post: 2007-11-05, 06:16
  4. MIDlet Permissions & Signing
    By msilvest@confsystem.com in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-09-17, 14:01
  5. How to create two instances of midlet
    By marquito99 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-04-30, 01:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×