Michele Lacorte
Michele Lacorte

Reputation: 5363

Pass data through app android

I want to pass Object from App1, App2, App3 --> AppG. In particular:

App1, App2, App3 can secure save Object.

AppG can read this Object and do stuff.

I read about ContentProvider, Meta-Data, Parcelable, SharedPref and so on but nothing do what I need, some of those required app signed with same key, other hasn't safe.

Upvotes: 2

Views: 100

Answers (1)

Nir Duan
Nir Duan

Reputation: 6392

There are a lot of ways to communicate between two apps but if you need:

  1. Pass an Object that you've created (Not from Java/Android).
  2. Create a callback (e.g OnClickListener) over IPC.

There are much less options that will work for you, follow the next steps:

  1. Use AIDL to speak between the apps. AIDL will provide a very raw mechanism to pass data between apps with different processes.
  2. In-order to be able to pass your Object between processes implement the Parcel class.
  3. To create a call back you need to create another parcelable object as your callback interface and set it as a return value(Guide)

Upvotes: 2

Related Questions