Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
4 replies Latest Post - ‏2013-02-03T07:32:29Z by IdanAdar
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic Problem with WL 5.0.5.1 and Android 4.1.2 (emulator?)

‏2013-01-25T19:08:20Z |
I'm seeing what to me is a new behavior with Worklight 5.0.5.1 running apps in an Android 4.1.2 emulator.

I am using Studio 5.0.5.1 Marketplace install running in Junos on OSX Mountain Lion (I have seen the same behavior on Studio 5.0.5.1, installation Manager install, on Windows 7)

I create a new Worklight Project and Hybrid app. No toolkits, not modifications to the generated artifacts. I add an android environment, build all and deploy, and run the android project to launch it to my Android 4.1.2 emulator.

About half the time, the app starts up, but it is greyed out and a "Loading" dialog with a spinner is displayed ... forever.

If I hit the back button, that clears the Loading dialog, and my app seems to be OK.

If I hit the back button again to exit the app, and re-start it from within the emulator, about half the time it starts cleanly, and about half the time it gets stuck on the "Loading" dialog.

If I run the app on a 4.2 emulator, I can see the "Loading" dialog flash when the app loads, but it always goes away instantly. If I wasn't watching closely I'd never notice it.

Is the a Worklight issue? An Android issue? ("Loading" is a particularly unhelpful string to search on)

If this is purely an emulator issue, then switching to 4.2 for testing is fine. I don't have a 4.1.2 device to test whether this would happen on an actual phone.

Does anyone else see this behavior?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Problem with WL 5.0.5.1 and Android 4.1.2 (emulator?)

    ‏2013-01-27T06:53:17Z  in response to SystemAdmin
    I have yet to see it. Do you have any logs from LogCat to share?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: Problem with WL 5.0.5.1 and Android 4.1.2 (emulator?)

    ‏2013-01-31T16:31:40Z  in response to SystemAdmin
    Hi David,

    I am seeing the behavior you describe, starting with Worklight 5.0.5.1. I have seen this on a Android 2.3.3, 4.0.3 device. On a 4.2 device (Nexus 7), I see the spinner flash and go away almost instantly.

    In wlclient.js, at line 843, these lines are new:
    [code]
    if (!isIOSEnv()) {
    WL.Client.__showBusy();
    }
    [/code]

    I believe another user has reported seeing this problem as well:
    https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14934962

    I have an app that needs to support other languages, but one problem is that Loading spinner is English-only, so I would preferably not have this displayed.
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: Problem with WL 5.0.5.1 and Android 4.1.2 (emulator?)

    ‏2013-02-01T19:30:28Z  in response to SystemAdmin
    The busyIndicator was hardcoded with the message "Loading". Our Worklight app supports both Android and iOS platform with multiple languages support. We didn't see this "Loading" spinner in 5.0.5 and it seems it is new in WL 5.0.5.1.

    Could we somehow disable it to be shown?

    Even though the spinner may go away some time, it will look weird to see the spinner to be shown momentarily during app start up or loading a new page.

    Patrick
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Problem with WL 5.0.5.1 and Android 4.1.2 (emulator?)

    ‏2013-02-03T07:32:29Z  in response to SystemAdmin
    Again, I can't say I am experiencing the very same thing...

    Samsung Galaxy Nexus
    Android OS 4.2
    Eclipse Juno 4.2.1
    IBM Worklight Studio 5.0.5100.v20130115_1827
    Android Development Tools 21.0.1.v201212060256-543035
    I have all API level downloaded, by default Worklight uses 2.2 (API level 8)

    Steps:
    New Worklight project >> New Worklight application >> Added Android environment
    1. connectOnStartup = false

    Launching the app several times, I do see a busy indicator blinking at the very beginning, every time while launching the app.

    2. connectOnStartup = true

    Launching the app several times, I do see a busy indicator for a short while longer, every time while launching the app.

    In both cases the busy indicator does not remain on the screen.
    There indeed seems to be a change from 5.0.5, where in the case of connectOnStartup = false/true, there was no busy indicator on startup.

    I have opened a Customer Issue.
    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform