×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    UI freeze after calling platformRequest to open URL

    In my LWUIT app I am calling platformRequest to open a URL after user click a button, but the issue is that after opening URL and back to my app by pressing the back button in Asha 501 emulator, the UI of my app freezes. What's the matter?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: UI freeze after calling platformRequest to open URL

    Hi,

    I have observed this with Nokia SDK 2.0 , but it was not reproducible on device ( Asha 310 and 311), so i would recommend to test this on a device !!

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: UI freeze after calling platformRequest to open URL

    Ok, will test it on device.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: UI freeze after calling platformRequest to open URL

    imgen, have you called platformRequest directly from the commandListerner? That does not work in the new Asha software platform anymore, because in the listener we are in the event dispatcher thread. Have you tried to call platformRequest from a new (anonymous) Thread?

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: UI freeze after calling platformRequest to open URL

    I did try using the new Thread like below
    new Thread(new Runnable() {
    public void run() {
    try {
    midlet.platformRequest(url);
    } catch (ConnectionNotFoundException e) {
    }
    }
    }).start();

    With the emulator, when I return from the browser to the UI, the UI is partially responsive - meaning that I can click button and the browser will open again but UI won't refresh, I can choose item in the list but the list won't refresh, I cannot scroll the UI and all that, it's still freezed. What have I done wrong?

    Quote Originally Posted by traud View Post
    imgen, have you called platformRequest directly from the commandListerner? That does not work in the new Asha software platform anymore, because in the listener we are in the event dispatcher thread. Have you tried to call platformRequest from a new (anonymous) Thread?
    Last edited by imgen; 2013-05-22 at 13:28.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: UI freeze after calling platformRequest to open URL

    Works here. To reproduce it here, I would need a more stripped down, but complete MIDlet which demonstrates your issue.
    Last edited by traud; 2013-05-22 at 20:57.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: UI freeze after calling platformRequest to open URL

    You may want to check what platformRequest returns. While various sources on this site say it is always false, it may end up being true.
    Then, as the original documentation (http://docs.oracle.com/javame/config...a.lang.String)) says
    Returns:
    true if the MIDlet suite MUST first exit before the content can be fetched.
    Last edited by wizard_hu_; 2013-06-04 at 11:12.

  8. #8
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: UI freeze after calling platformRequest to open URL

    I did test the return value, but it's indeed false. I think this is an issue with the new Asha platform since the same code in the RLinks sample also cause UI freeze.
    Last edited by imgen; 2013-06-05 at 08:21.

  9. #9
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: UI freeze after calling platformRequest to open URL

    Still, I think this is because of your computer setup (64 bit). Here, I am not able to reproduce this.

Similar Threads

  1. open a url with platformrequest or by httpconnection GET what's the diff
    By rajubeta in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2013-04-08, 13:01
  2. Open file with MIDlet.platformRequest()
    By antonio.barone in forum Mobile Java General
    Replies: 9
    Last Post: 2011-01-28, 11:15
  3. Problem on calling platformRequest?
    By hangyc in forum Mobile Java Networking & Messaging & Security
    Replies: 8
    Last Post: 2006-10-26, 23:14
  4. platformRequest() to open FileBrowser
    By tknerr in forum Mobile Java General
    Replies: 0
    Last Post: 2005-06-06, 11:15
  5. Replies: 4
    Last Post: 2005-02-06, 15:23

Posting Permissions

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