Android 应用内计费版本3 API SharedReferences存储替代方案

Android 应用内计费版本3 API SharedReferences存储替代方案,android,sharedpreferences,in-app-billing,Android,Sharedpreferences,In App Billing,我正在研究Android的实现,在Android的示例代码中遇到了以下警告: /* * WARNING: on a real application, we recommend you save data in a secure way to * prevent tampering. For simplicity in this sample, we simply store the data using a * SharedPreferences. */ 如果用户购买了一个项目,我只

我正在研究Android的实现,在Android的示例代码中遇到了以下警告:

/*
 * WARNING: on a real application, we recommend you save data in a secure way to
 * prevent tampering. For simplicity in this sample, we simply store the data using a
 * SharedPreferences.
 */

如果用户购买了一个项目,我只需要存储一个简单的标志,而使用SQLite数据库似乎有些过分。我只是想知道我的替代方案是什么,看起来Android建议不要使用SharedReference。

在设备上本地存储数据通常被认为是不安全的,用户访问和修改设备共享首选项文件也不太困难。这里没有什么灵丹妙药,但推荐的方法是使用您自己的服务器,并使用服务器进行通信

然而,出于您的目的,最简单的“安全”方法是加密SharedReferences数据()