Android private content provider?

自作多情 提交于 2019-12-03 06:57:44

问题


I am developing an application that involves some sensitive user information. I retrieve this information via a private web API. I am trying to determine the best way to get this data into my app. Right now I'm exploring creating a content provider that can do so; my hesitation is in making it secure. I want this data to be usable only by my application. Ideally, no other apps would even know it exists.

Do you have any pointers or advice on how to do this effectively and securely? Any info on content providers who's data source is a remote OAuth'd API?

Thanks!

Edit: I say content provider, but if that isn't the best way to do what I need, by all means let me know what else to look into.


回答1:


Try android:exported="false" in your manifest.




回答2:


Why even consider a ContentProvider? As far as I know ContentProviders are meant to share data with other applications. I would suggest writing a utility class to interface with your storage of the sensitive data, be it SQLite or whatever.

-Dan



来源:https://stackoverflow.com/questions/3814610/android-private-content-provider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!