views:

62

answers:

2

Hello,

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  A: 

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

CommonsWare
+1  A: 

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

Dan Watling
A content provider just seemed to be the way to go. I am very much not opposed to an alternative solution that utilizes more appropriate components.
Allyn
The utility class I suggested would be an acceptable solution in my eyes. It would manage your database connection and storage / retrieval / encryption of the data in the database. When I say "utility class", I really mean just a regular old Java class. I don't believe there is anything Android-specific you can use that would fulfill what you are looking for.
Dan Watling