IBM Worklight - 如何在更新应用程序之前执行JavaScript代码? [英] IBM Worklight - How can I execute JavaScript code before updating the application?

查看:183
本文介绍了IBM Worklight - 如何在更新应用程序之前执行JavaScript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当有新的软件更新可用时,如果用户将数据存储在jsonstore中,我需要允许用户在应用软件更新之前将它们提交到服务器,因此他/她的未经更新的更新不会丢失。
目前用户在安装更新之前无法使用该应用程序。

When a new software update is available, if user has data stored in jsonstore I need to allow user to commit them to the server before applying the software update, so his/her uncommited updates don't get lost. Currently user is unable to use the application until the update is installed.

有没有办法在更新应用程序之前执行JavaScript代码,这样我就可以初始化jsonstore,在执行更新安装之前获取数据并发送到适配器?

Is there a way to execute JavaScript code before updating the application so I can initialize the jsonstore, take the data and send to the adapter before performing the update installation?

推荐答案

我们看到卸载和 beforeunload事件在DirectUpdate之前被触发。如果数据在那个时间点仍然可以在内存中使用,这可能是代码选项吗?

We saw that the "unload" and "beforeunload" events are fired before a DirectUpdate. Maybe this is an option for code if the data is still available in memory at that point in time?

WL 5.0.6.1 Android - 直接更新使Native / Cordova资源保持活动状态内存(例如BusyIndi​​cator)但参考丢失了

这篇关于IBM Worklight - 如何在更新应用程序之前执行JavaScript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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