即使在卸载或更新应用程序后,我也需要Adobe AIR For Android Encrypted Local Store或Application Storage数据。 [英] I need Adobe AIR For Android Encrypted Local Store or Application Storage data to persist even after uninstalling or updating the app.

查看:304
本文介绍了即使在卸载或更新应用程序后,我也需要Adobe AIR For Android Encrypted Local Store或Application Storage数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据加密本地存储文档,只要Android应用程序的应用程序ID保持不变,即使应用程序版本号不同,ELS也应该保持不变。不幸的是,根据我的经验,情况并非如此。

示例代码在这里:

  //保存
var baWrite:ByteArray = new ByteArray();
baWrite.writeObject(appData);
EncryptedLocalStore.setItem(APP_DATA_NAME,baWrite);

//加载
var baRead:ByteArray = EncryptedLocalStore.getItem(APP_DATA_NAME);
appData = baRead.readObject();

我的理论是发布者ID也需要设置,但我不确定。

解决方案

根据这里的文档: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7e31.html 它说:



从adobe doc复制:由于各种原因,ELS中的数据可能会丢失。例如,用户可以卸载应用程序并删除加密的文件。或者,发布商ID可能因更新而更改。因此,ELS应该被视为私有缓存,而不是永久的数据存储。

According to Encrypted Local Store documentation, ELS should persist as long as the Android AIR App's application ID is kept the same even though the app version number is different. Unfortunately this is not the case based on my experience. I have set the stronglybound paramater to false as well.

Sample code here:

//saving
var baWrite:ByteArray = new ByteArray();
baWrite.writeObject(appData);
EncryptedLocalStore.setItem(APP_DATA_NAME, baWrite);

//loading
var baRead:ByteArray = EncryptedLocalStore.getItem(APP_DATA_NAME);
appData = baRead.readObject();

My theory is that Publisher ID needs to be set also but I am not really sure.

解决方案

according to documents here: http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7e31.html it says:

copy from adobe doc: Data in the ELS can be lost for a variety of reasons. For example, the user could uninstall the application and delete the encrypted file. Or, the publisher ID could be changed as a result of an update. Thus the ELS should be treated as a private cache, not a permanent data storage.

这篇关于即使在卸载或更新应用程序后,我也需要Adobe AIR For Android Encrypted Local Store或Application Storage数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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