扩展 Android 上的联系人应用程序以提供加密
我想根据用户的偏好对 Android 上的联系人应用程序存储的个人联系人进行加密。因此,我想我必须在将数据存储到数据库之前挂钩/扩展Contacts应用程序,并在用户想要查看它时对其进行解密。另外,我假设我必须将加密密钥存储在文件中。有人可以建议如何去做吗?
谢谢!
I want to encrypt individual contacts stored by the Contacts application on Android based on user's preference. So, I am thinking I'll have to hook/extend the Contacts application before the it stores data into the database and decrypt it when the user wants to view it. Also, I am assuming I will have to store the key for encryption in a file. Can anybody suggest how to go about it?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的目标虽然令人钦佩,但却不切实际。没有“联系人应用程序”。 Android 有一个标准的联系人内容提供程序和相关活动。它已被 HTC(在支持 Sense 的设备上)、摩托罗拉(在支持 MOTOBLUR 的设备上)以及其他 OEM 厂商所取代。再加上它们中的任何一个都没有“挂钩/扩展”机制的事实,我不知道如何创建您正在寻找的东西。
Android 2.0 修订后的 Contacts API(尤其是多个帐户)可能会为您提供更多选择。您可能必须创建某种代表您的加密联系人的帐户,并且您可能有办法做到这一点。然而,我还没有机会深入研究新的 API,无法确定这种方法是否可行。而且,它仍然假设 OEM 停止用自己的联系人内容替换本机联系人内容,但这还远不确定。
Your goal, while admirable, is impractical. There is no "Contacts application". Android has a standard Contacts content provider and related activities. That has been replaced by HTC (on Sense-enabled devices), by Motorola (on MOTOBLUR-enabled devices), and perhaps other OEMs as well. Combine that with the fact that there is no "hook/extend" mechanism for any of them, and I do not see how you can create what you are looking for.
The Android 2.0 revised Contacts API, particularly with multiple accounts, may give you more options. It may be you have to create some sort of account that represents your encrypted contacts, and you might have the hooks to do that. However, I have not had an opportunity to dig into the new API enough to say for certain whether this approach is or is not feasible. And, it still assumes that OEMs stop replacing the native Contacts stuff with their own, and that's far from certain.