-1

I have developed a Worklight application in Dojo for BlackBerry OS 10.

When I click the "Reload" button, the WL.Client.reloadApp() API method is invoked.
The app gets reloaded with white screen.

I have attached the screenshots which will explain the issue.

Homescreen

when reloading

enter image description here

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
dhineshsundar
  • 112
  • 1
  • 10

1 Answers1

2

IMO this is the expected behavior.

When using WL.Client.reloadApp() you essentially request to reload the web resources of the application; you can't expect to both show them and reload them at the same time. Thus, this is the expected behavior and the same will also happen when previewing via Worklight Console's MBS (I've checked that).

A question to ask is, why would you want to have such a button in your application to reload the app... Your scenario is unclear to me.

What you can do perhaps, is display some image while reloading using the Cordova Splashscreen API. Something like this:

function reload() {
    navigator.splashscreen.show();
    WL.Client.reloadApp();
}

This way when executing this function a splash will be displayed, masking the "white screen".
Next, after the app inits, you'll need to remove the splash...

So in wlCommonInit() you'll do:

function wlCommonInit() {
    navigator.splashscreen.hide();
    ...
    ...
}

This should not interfere with the splash image shown by the Worklight framework upon application startup.

Try it.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89