Tuesday, February 25, 2014

Data sharing between two apps.. Android



Moreover, making any file MODE_WORLD_READABLE or (worse) MODE_WORLD_WRITEABLE is a bad idea. You lose any hope of security.
If you wish to share data between two applications, there are a myriad of solutions, such as:
  • service with an API exposed by AIDL
  • service with an API exposed via commands sent via startService() and responses sent via aMessenger or createPendingResult() PendingIntent or something
  • content provider
  • broadcast Intents
All of those allow you to define permissions for integration and let you control the granularity of access.

No comments:

Post a Comment