我在安卓系统中遇到了JSONStore init功能的问题。它将挂起大约10分钟,直到那时JSONStore给我init结果回调。只有在安卓系统中才会出现这种情况,而且iPhone运行得很好。我可以给出复制程序:
我用检查调试应用程序,我相信这就是WL.JSONStore.init没有给我挂起应用程序的结果回调的问题。我不知道为什么第一次要消耗这么多时间。有人遇到和我一样的问题吗?
var options = {password:pscd,localKeyGen:true};
var promise =
WL.JSONStore.init(data_collection, options).then(function(){
console.info("init json store successfully!");
return true;
}).fail(function (errorObject) {
console.info("init json store failed!" + errorObject);
return false;
});
return promise;发布于 2014-09-17 18:45:38
我刚刚在您所拥有的6.1版本中试用了以下代码,它在Android仿真程序和Nexus 4上都运行良好:
var data_collection = {people : {
searchFields : {name : 'string', age : 'integer'}
}
};
var pscd = "samplepassword";
var options = {password:pscd,localKeyGen:true};
var promise =
WL.JSONStore.init(data_collection, options).then(function(){
alert("init json store successfully!");
return true;
}).fail(function (errorObject) {
alert("init json store failed!" + errorObject);
return false;
});
return promise;唯一与代码不同的是密码或data_collection变量是什么。你能补充更多关于data_collection是什么的细节吗?
https://stackoverflow.com/questions/25799909
复制相似问题