Android 直接更新错误\u解压失败
我们正在定制文档中的DirectUpdate过程(-使用directUpdateCustomListener),但在onFinish回调中,状态为FAILURE\u UNZIPPING 我正在Android(5.1.1)模拟器上测试Android 直接更新错误\u解压失败,android,ibm-mobilefirst,Android,Ibm Mobilefirst,我们正在定制文档中的DirectUpdate过程(-使用directUpdateCustomListener),但在onFinish回调中,状态为FAILURE\u UNZIPPING 我正在Android(5.1.1)模拟器上测试 function wlCommonInit(){ WL.Client.connect({ onSuccess: function() { console.log("Successfully connected to W
function wlCommonInit(){
WL.Client.connect({
onSuccess: function() {
console.log("Successfully connected to Worklight Server.");
}, onFailure: function() {
console.log("Failed connecting to Worklight Server.");
}
});
}
var busyInd = new WL.BusyIndicator('content');
var savedDirectUpdateContext = null;
var restartDirectUpdate = function () {
if (savedDirectUpdateContext != null) {
savedDirectUpdateContext.start(directUpdateCustomListener); // use saved direct update context to restart direct update
}
};
var directUpdateCustomListener = {
onStart: function(totalSize) {
busyInd.show();
},
onProgress: function(status, totalSize, completeSize) {},
onFinish: function(status) {
busyInd.hide();
console.log("[MFP - DirectUpdate] Finish status: " + status);
var posSuccess = status.indexOf("SUCCESS");
if (posSuccess > -1) {
WL.Client.reloadApp();
} else {
WL.SimpleDialog.show('Update Failed', 'Press try again button', [{
text: "Try Again",
handler: restartDirectUpdate // restart direct update
}]);
wl_directUpdateChallengeHandler.submitFailure();
}
}
};
wl_directUpdateChallengeHandler.handleDirectUpdate = function(directUpdateData, directUpdateContext) {
savedDirectUpdateContext = directUpdateContext
WL.SimpleDialog.show('Update Avalible', 'Press Update button to download the new version!', [{
text : 'Update',
handler : function() {
directUpdateContext.start(directUpdateCustomListener);
}
}, {
text : 'Cancel',
handler : function() {
wl_directUpdateChallengeHandler.submitFailure();
}
}]);
};
我们如何解决这个问题?没有安装zxing,自定义代码工作正常。我建议你在没有这个图书馆的情况下也尝试一下。如果它能工作,我怀疑它可能正在初始化或在收到更新后以其他方式干扰直接更新过程
考虑稍后在应用程序生命周期中加载库,看看这是否有帮助。提供实现和您预期的场景。发生上述错误时,您能否为服务器日志提供相应的时间戳?服务器日志:客户端日志:如果不自定义,直接更新是否可以正常工作?正在尝试查看定制是否导致问题如何才能做到这一点?我不手动加载它。。。它只是在本机应用程序中引用(作为库)。如果您可以提供您的项目,请打开PMR供支持团队进一步调试。