开发者

What is the recommended way to keep a list of contacts accessible only to my app?

开发者 https://www.devze.com 2023-03-10 05:04 出处:网络
I am building an application that needs to keep an list of contacts. That list will be built by inserting data by the user directly or by selecting from Android contacts.

I am building an application that needs to keep an list of contacts. That list will be built by inserting data by the user directly or by selecting from Android contacts.

But my list of contacts must not be accessible from outside my application (and will be a password protected application).

I guess I can use a SQLite database and encrypt the data. But is it som开发者_Python百科ehow possible to do it on top of the Android contacts provider?

I am targeting 2.2.


Quoting the first sentence of the Content Providers page of the dev guide:

Content providers store and retrieve data and make it accessible to all applications.

The providers are actually built with accessibility in mind, which is exactly the opposite of what you want. Databases, on the other hand, are accessible exclusively by the owner app. You could, in theory, create a content provider that only provides encrypted data, but I can't see the point in doing that. Your data would be less secure and you would not get any additional advantage over a database.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号