简体   繁体   English

Android私人内容提供商?

[英]Android private content provider?

I am developing an application that involves some sensitive user information. 我正在开发一个涉及一些敏感用户信息的应用程序。 I retrieve this information via a private web API. 我通过私人网络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? 有关数据源的内容提供商的任何信息都是远程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. 编辑:我说内容提供商,但如果这不是我需要的最佳方式,请务必让我知道还有什么可以研究。

在清单中尝试android:exported="false"

Why even consider a ContentProvider? 为什么甚至考虑使用ContentProvider? As far as I know ContentProviders are meant to share data with other applications. 据我所知,ContentProviders旨在与其他应用程序共享数据。 I would suggest writing a utility class to interface with your storage of the sensitive data, be it SQLite or whatever. 我建议编写一个实用程序类来与敏感数据的存储接口,无论是SQLite还是其他任何东西。

-Dan -担

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM