×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Warning message while reading/writing data in to a file.

    Hi All,

    I am craeting an application in J2ME, which is reading and writing data in to an existing file, and if the file already doesn't exist, it creates the file.

    When I compiled and executed the application in the emulator (J2ME Wireless Toolkit), it was prompting with the warning message "The application ____ is about to read the user data?".

    I removed the warning by making it a "trusted" application in the Edit -> Preferences section.

    But when I sent the .jar of the app, and installed and executed it in the phone, it gave me the same warning message.

    Can anyone tell me how can I remove this warning message, because it is very unfriendly.
    I am getting troubled with this because, when a file read/write is done via Symbian, no such warning messages are thrown at the user. Why J2ME throws them?

    Is it because , MIDP/CLDC doesn't support any file structure of their own.

    How can I remove this warning? i.e. how can I make my application trusted.

    Regards,
    Ashish

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,560

    Re: Warning message while reading/writing data in to a file.

    Have it signed by Java Verified: http://www.javaverified.com/

  3. #3
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Warning message while reading/writing data in to a file.

    Isn't there any other way, to remove this warning (apart from getting it signed).

    I need to develop a small demo of my application and present it in front of a client.

    If there any other way, I can do this please help me out.

    Regards,
    Ashish

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,560

    Re: Warning message while reading/writing data in to a file.

    Not my area of expertise, but perhaps self-signing with a suitable developer cert with a corresponding root cert on the phone?

    That's how it is done with Symbian Signed (a developer can get a developer cert that applies to development phones; locked to IMEIs).

  5. #5
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Warning message while reading/writing data in to a file.

    What phone model are you using? Some Series 60 allow you to create your own root certificate (without having to pay to Verisign for example), import it into the phone via Bluetooth and then use it to sign your midlet.

    Daniel

  6. #6
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: Warning message while reading/writing data in to a file.

    Hello there,

    You should set the JSR-75 File Connection API permissions.

    Here is the how-to paper:

    Forum Nokia - MIDP 2.0: Tutorial On Signed MIDlets v1.1
    http://www.forum.nokia.com/info/sw.n..._1_en.pdf.html

    Check Appendix A - Summary of Protected Methods, A.8 PDA Optional Packages JSR75. Set the permissions for javax.microedition.io.file.FileConnection (javax.microedtion.io.Connector.file.xxx), where xxx is read/write.

    Use the appropriate Security Domain and Function Group.
    Juarez Alvares Barbosa Junior - Brazil

  7. #7
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Warning message while reading/writing data in to a file.

    Quote Originally Posted by petrib
    Not my area of expertise, but perhaps self-signing with a suitable developer cert with a corresponding root cert on the phone?

    That's how it is done with Symbian Signed (a developer can get a developer cert that applies to development phones; locked to IMEIs).
    Hi petrib,

    If I want to get the certificate for the cell phone that I have and get the applications developed, without any such warnings and other things, how can I get this certification.

    That is, whom should I consult - Is it Symbian?

    Is it paid?
    If yes, how much does it cost?

    Do I need to buy extra certifications for similar other functionalities, or this certification will enable all these on the phone?

    Isn't there any way I can get it for free?

    If not, please tell me the right source where I can get such certification, for the phone I have.

    Regards,
    Ashish

  8. #8
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Warning message while reading/writing data in to a file.

    I mean by my previous reply is that,

    whether this certification will be enough to access the PIM and other facilities like MMS, SMS, and most importantly network related operations.

    or do I need to get them for the specific functionality?

    Regards,
    Ashish

  9. #9
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Warning message while reading/writing data in to a file.

    Quote Originally Posted by dcrocha
    What phone model are you using? Some Series 60 allow you to create your own root certificate (without having to pay to Verisign for example), import it into the phone via Bluetooth and then use it to sign your midlet.

    Daniel
    Hi dcrocha,

    I am using Nokia 6681 to develop and test my applications.

    Regards,
    Ashish

  10. #10
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Warning message while reading/writing data in to a file.

    Hi petrib,

    I have checked a document released by Symbian regarding the process followed for the generation of Developer certificates - Developer_Certificate_Request_Process.pdf. It clearly states that

    Symbian Developer Certificates are only used in the context of Symbian OS v9 based phones. Developer Certificates are not required (and not used) with earlier versions of Symbian OS.
    And I am using Nokia 6681 as the development device, which is based on Symbian OS 8.0a. So is there any other way, I can get rid of these warnings -apart from getting my application verified.


    I also want to ask whether, if I get my application signed by Verisign or any other Certificate issuing authority, do I need to buy another certificate, if I update my code and hence .jar and .jad.

    Suppose, I have bought a certificate for one version of my application. Now, after that I detect an important functionality missing. Now do I have to get another certificate, for the updated code.

    Regards,
    Ashish

  11. #11
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Warning message while reading/writing data in to a file.

    Hello,

    Besides getting your application Java Verified, you can simply buy a certificate from a trusted CA (such as Verisign), sign your .jad file and install your application on the phone.

    You don't need to purchase another certificate just because you update your code: sign the file with the same certificate and install it again on the phone. With Java Verified, you do need to resubmit your application for testing, but only thing you need to pay is another round of tests, you don't need to buy yourself another certificate.

    For Testing Purposes Only , with no guarantees it will work on all devices, you can do the following:

    - Create a self-signed cert with the commands:

    1) keytool -genkey -alias testCA -keyalg RSA -keysize 512 -validity 360 -keypass password -keystore example.sks -storepass password

    2) keytool -selfcert -alias testCA -keypass password -keystore example.sks -storepass password

    3) keytool -export -alias testCA -file testCA.cer -keystore example.sks -storepass password

    - Send the testCA.cer to your phone via Bluetooth, install it as a certificate, giving it permission to validate Java installations (as a test, I would give it all permissions).

    - Using Nokia Developer Suite, configure all permissions related to your application (specially javax.microedition.io.Connector.file, both read and write).

    - Install your application using PC Suite

    - Go to Tools / Manager / check your application name / Options / Suite Settings /

    - Give it "Always Allowed" permission for read/add user data.

    - Test your midlet. It works in my 6681, don't know if it will work in yours.

    Daniel

  12. #12
    Super Contributor
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546

    Re: Warning message while reading/writing data in to a file.

    How to install the testCA.cer on my Nokia E61i
    When I send it via bluetooth, it goes to inbox and when I open it, it says "Unknown File Format"

  13. #13
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Warning message while reading/writing data in to a file.

    Quote Originally Posted by arpit2agrawal View Post
    How to install the testCA.cer on my Nokia E61i
    When I send it via bluetooth, it goes to inbox and when I open it, it says "Unknown File Format"
    Try to archive it (in zip format), send it, extract it on the phone and install it.

  14. #14
    Super Contributor
    Join Date
    Jan 2008
    Location
    Amravati, India
    Posts
    546

    Re: Warning message while reading/writing data in to a file.

    Using data cable, I have copied it to phone memory. C:\Data\Documents
    But when I open it using file manager, it says cannot open. How to install file "C:\Data\Documents\testCA.cer" ???

  15. #15
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Warning message while reading/writing data in to a file.

    Like Daniel said in his reply, there are no guarantees it will work on all devices, and this has been reported to work on a Nokia 6681 which is an S60 2nd Edition device. The Nokia E61i is an S60 3rd Edition device. Also, this article mentions the hack as being available for 2nd Edition.

    So, it most probably is normal for it not to work on the E61i.

Similar Threads

  1. "Authorization failed" message displayed when installing jar file
    By capricious28 in forum Mobile Java General
    Replies: 10
    Last Post: 2014-07-04, 11:22
  2. AT commands - sending ringtone using PDU
    By liangzhuge in forum Smart Messaging
    Replies: 39
    Last Post: 2007-04-06, 10:18
  3. Image viewer additional message data
    By eshlomi in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-08-24, 12:52
  4. How to reformat the file?
    By ryanfunghk in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-03-26, 17:43

Posting Permissions

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