Is it possible to allow Worklight users to use app

2019-09-14 17:04发布

Let's say I push new code to the Worklight server for purposes of a Direct Update. Can I allow users to still use the application for a set amount time before they actually have to accept the update or is the application essentially unavailable to them until they download the new code?

1条回答
Deceive 欺骗
2楼-- · 2019-09-14 17:52

If you are developing your application using Worklight 6.2, then you as a developer can take over the entire Direct Update flow and can essentially decide how to handle a received update from the server.

Note that by taking full control, you own the flow end-to-end; the default Worklight framework handling will not be available and the full responsibility is on the developer to ensure the validity of every step.

You can read more about customizing Direct Update, here:

In your scenario, I think you could probably go in a less extreme way and just do some tweaks before letting the Worklight framework handle the update from the server. Meaning, you could use the example provided in the training module (slide #18 from the PDF above), where you intercept the update:

wl_directUpdateChallengeHandler.handleDirectUpdate = function(directUpdateData, 
directUpdateContext) { 

    ... // display message or counter
}

And display a message and start a counter, and when time's up just directUpdateContext.start(); the update.

查看更多
登录 后发表回答