×

Discussion Board

Results 1 to 11 of 11

Hybrid View

  1. #1
    Registered User
    Join Date
    Nov 2012
    Location
    Lahore, Pakista
    Posts
    58

    Signed J2me app Hanging problem at first start

    in my j2me app that is signed by veri sign, has problem in accepting the always or yes permissions the time it has to perform PIM.getInstance().open.... action perform.
    When my app perform below line of code very first time of it's installation it hangs and doesn't show up the main screen rather a black background hanged screen. When I exit and
    restart the application it runs normally without any problem even if I delete it and download again and runs fine, except I delete and restart the phone and try to run it again it shows the same
    problem I described above.
    my code of line that causes to ask permissions is here that actually also causes the problem. I am at the end and now it's showing this error, i really need help. Thanks

    private void permissionSettings() throws PIMException {
    PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
    }

    that's it

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Signed J2me app Hanging problem at first start

    Quote Originally Posted by saqibatiq View Post
    in my j2me app that is signed by veri sign, has problem in accepting the always or yes permissions the time it has to perform PIM.getInstance().open.... action perform.
    When my app perform below line of code very first time of it's installation it hangs and doesn't show up the main screen rather a black background hanged screen. When I exit and
    restart the application it runs normally without any problem even if I delete it and download again and runs fine, except I delete and restart the phone and try to run it again it shows the same
    problem I described above.
    my code of line that causes to ask permissions is here that actually also causes the problem. I am at the end and now it's showing this error, i really need help. Thanks

    private void permissionSettings() throws PIMException {
    PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
    }

    that's it
    On 1st launch of the app on the device, before reading PIM data (above line) educate the user for giving the required PIM access permissions to app via settings...

    Are you installing this app via JAD -OTA and have you asked for required permissions in JAD.... ?

    Which is your target device - if you install the app, setup the permissions from App setting and then launch the app - does it works good?
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User
    Join Date
    Nov 2012
    Location
    Lahore, Pakista
    Posts
    58

    Smile Re: Signed J2me app Hanging problem at first start

    Quote Originally Posted by im2amit View Post
    On 1st launch of the app on the device, before reading PIM data (above line) educate the user for giving the required PIM access permissions to app via settings...

    Are you installing this app via JAD -OTA and have you asked for required permissions in JAD.... ?

    Which is your target device - if you install the app, setup the permissions from App setting and then launch the app - does it works good?
    Exactly it educates user about granting permissions for Read and Edit user data. I have both OTA and Offline file available, no matter which way I do it shows the same error. One more thing as you asked about the target device I have this problem over Nokia x2-02, x2-05, c2-02 and Asha 200. On all these devices it has same problem but amazingly on c3-02 it runs without any error, the reason could be it's different behavior as it doesn't give option of permissions as (Yes, Always, No) rather it gives Yes and if I have to set it to Always I shall manually edit its settings.

    In my JAD I have set all the permissions required. If I add permissions manually it works fine but thing I wonder is why doesn't it start the very first time. Yes there is always a second solution but I want to run it the way it should. No problem at very first time. Any idea what changes should I do? thanks for your reply!

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Signed J2me app Hanging problem at first start

    Quote Originally Posted by saqibatiq View Post
    Exactly it educates user about granting permissions for Read and Edit user data. I have both OTA and Offline file available, no matter which way I do it shows the same error. One more thing as you asked about the target device I have this problem over Nokia x2-02, x2-05, c2-02 and Asha 200. On all these devices it has same problem but amazingly on c3-02 it runs without any error, the reason could be it's different behavior as it doesn't give option of permissions as (Yes, Always, No) rather it gives Yes and if I have to set it to Always I shall manually edit its settings.

    In my JAD I have set all the permissions required. If I add permissions manually it works fine but thing I wonder is why doesn't it start the very first time. Yes there is always a second solution but I want to run it the way it should. No problem at very first time. Any idea what changes should I do? thanks for your reply!
    The Black background and UI geting stuck on this PIM operation - may be because of some type of UI dead-lock, check if you are trying the access the PIM from a thread that is independent of UI - repaint / refresh?
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  5. #5
    Registered User
    Join Date
    Nov 2012
    Location
    Lahore, Pakista
    Posts
    58

    Re: Signed J2me app Hanging problem at first start

    Quote Originally Posted by im2amit View Post
    The Black background and UI geting stuck on this PIM operation - may be because of some type of UI dead-lock, check if you are trying the access the PIM from a thread that is independent of UI - repaint / refresh?
    Hi @im2amit, thanks for the suggestion I came to know that issue is in opening ports for sending and receiving SMS and in emulator it warns me to use different thread for that than using in commandAction(). So what I did is to create new thread even a new thread class and put all that code (for sending) SMS in that and then call it there but still it shows the same issue, either m not getting what does different thread mean or there is some bug I couldn't find. Would please like to elaborate it a bite more? thanks
    Last edited by saqibatiq; 2013-01-08 at 05:36. Reason: Found the issue I discussing but still wondering to find next step

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Signed J2me app Hanging problem at first start

    Quote Originally Posted by saqibatiq View Post
    Hi @im2amit, thanks for the suggestion I came to know that issue is in opening ports for sending and receiving SMS and in emulator it warns me to use different thread for that than using in commandAction(). So what I did is to create new thread even a new thread class and put all that code (for sending) SMS in that and then call it there but still it shows the same issue, either m not getting what does different thread mean or there is some bug I couldn't find. Would please like to elaborate it a bite more? thanks
    Cut & Paste your codelet - where you are calling this new thread to send SMS from CommandAction()
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. [Moved]Hanging while connecting to network in J2ME applicaation
    By mahesh.kmrao in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2011-07-04, 15:10
  2. Hanging while connecting to network in J2ME applicaation
    By mahesh.kmrao in forum [Closed] Publishing to Nokia Store
    Replies: 1
    Last Post: 2011-07-04, 15:05
  3. Problem to install signed j2me app to S40. S60works fine
    By teamforce_paul in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-12-21, 12:21
  4. Replies: 3
    Last Post: 2009-05-21, 11:18
  5. Problem start-up: sound control in J2ME
    By wyi in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2007-04-27, 09:22

Posting Permissions

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