×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    6

    App can't browse files after publishing it in Nokia store

    Hi,

    I have developed a simple 3d J2ME application and published in Nokia store. I have tested the application on my mobile (Nokia C7) and on several others using the RDA. The application generally works fine with a few issues with some models. However I installed the version available from Nokia store and there is file reading functionality that does not work.

    One of the options in the application, the user can choose to browse for a file within the phone memory. I implemented this using the FileBrowser component in Netbeans. Additionally I added in the .jad file, API requested permissions javax.microedition.io.Connector.file.read. When I install the application by transferring the file to the phone and run it (unsigned), the app will ask for permission to access that on the phone and I can browse the files. When I install through the store, it gives me a error message after I try to access any of the "drives" saying "You are not authorized to access the restricted API". This error message is within the code of FileBrowser component. It appears that is the the code
    Code:
    currDir = (FileConnection) Connector.open("file:///" + currDirName);
    e = currDir.list();
    Maybe I have to add the permission request javax.microedition.io.Connector.file.write to the jad file. Is this correct? Or there is another solution?

    I was wondering if I could have some guidance on how to solve this problem.

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: App can't browse files after publishing it in Nokia store

    That's because you haven't added the following permission:

    javax.microedition.io.Connector.file.write

    Even if you don't write to the device's file system, you need it.

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    6

    Re: App can't browse files after publishing it in Nokia store

    Ok, thanks. I think I take your advice and that it will stop the error message from appearing. I was wondering if there is a way to test it.

    What if I changed the code in the FileBrowser.java to something like ?
    Code:
    currDir = (FileConnection) Connector.open("file:///" + currDirName, Connector.READ);
    Would I still need to add the write permission ?

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: App can't browse files after publishing it in Nokia store

    Correct, if you use only Connector.READ you don't need the write permission.

    On way you can simulate the trusted domain and see if the application is trying to use a protected method call, for which you haven't requested explicit permission in the application descriptor, is to use the SDK's security domain option. On Nokia SDK 1.1 for example this option is available from Tools > Preferences > MIDP. If you set the security domain to trusted and at the same time set the permissions for read user data to "always allowed" and the permission "add and edit data" to not allowed, the application will crash upon launch, meaning that it requires the write permission. It won't give you an error, on the other hand, if you add the Connector.READ.

Similar Threads

  1. Publishing to Ovi store with new Qt SDK 1.1
    By gerasalus in forum [Archived] Qt SDKs and Tools
    Replies: 12
    Last Post: 2011-06-07, 14:08
  2. Mobile support and publishing application to Nokia OVI store.
    By s.abulkalamazad in forum Mobile Java General
    Replies: 1
    Last Post: 2011-04-05, 20:52
  3. Publishing on Ovi Store
    By earendil in forum [Closed] Publishing to Nokia Store
    Replies: 9
    Last Post: 2010-05-24, 05:05
  4. how to browse system files on Nokia 9500
    By tahirfs in forum General Development Questions
    Replies: 0
    Last Post: 2005-02-26, 07:20
  5. Is the Nokia 3510 compatible with Content Publishing Toolkit .mm files?
    By winsoar in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2002-08-06, 04:59

Posting Permissions

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