是否可以允许Worklight用户在更新前使用应用程序? [英] Is it possible to allow Worklight users to use app before updating?

查看:131
本文介绍了是否可以允许Worklight用户在更新前使用应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我将新代码推送到Worklight服务器以进行直接更新。我可以允许用户在实际必须接受更新之前仍然使用应用程序一段时间,或者在下载新代码之前应用程序基本上不可用吗?

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?

推荐答案

如果您正在使用Worklight 6.2开发应用程序,那么您作为开发人员可以接管整个直接更新流程,并且基本上可以决定如何处理从服务器接收的更新。

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.

请注意,通过完全控制,您可以拥有端到端的流程;默认的Worklight框架处理将不可用,并且开发人员有责任确保每个步骤的有效性。

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.

您可以在此处阅读有关自定义Direct Update的更多信息:

You can read more about customizing Direct Update, here:

深入阅读: http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev .doc / dev / c_customizing_direct_update_ui_android_wp8_ios.html

在您的方案中,我认为你可能会以一种不那么极端的方式进行调整,然后在让Worklight框架从服务器处理更新之前做一些调整。这意味着,您可以使用培训模块中提供的示例(上面PDF中的幻灯片#18),您可以截取更新:

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
}

并显示一条消息并启动一个计数器,当时间刚好 directUpdateContext.start(); 更新。

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

这篇关于是否可以允许Worklight用户在更新前使用应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆