I am trying to decide the best approach to expose encrypted content stored on phone to 3rd party apps. The content is sensitive and needs to be protected so only certain apps can access this. The approaches I'm investigating are IPC and Content Provider. Below is what I believe to be some of the pro's and con's of both for my situation.
IPC - Pro's
- Flexible response types to client. Different error codes and levels of restricted access can be returned
IPC - Con's
More complicated to implement than Content Provider
Would have to write own way of securing access to content.
Content Provider - Pro's
Easy to implement
Easy to secure access by making provider definition permission: protectionLevel=signature
Content Provider - Con's
To secure access, the Content Provider's key signature must be shared with 3rd party app which isn't ideal.
Limited flexibility in results types returned. Content Provider returns only a Cursor object for the columns that were queried.
Is there any major differences on performance and battery?
Can either execute asynchronously?
Any other comments/suggestions to the list?