2

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.

Michele Lacorte
  • 5,323
  • 7
  • 32
  • 54

1 Answers1

2

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)
Community
  • 1
  • 1
Nir Duan
  • 6,164
  • 4
  • 24
  • 38
  • I got this error while generate .java file from .aidl `Error:Execution failed for task ':library:compileReleaseAidl'.` I build with API 25 and build tool 25.0.0 – Michele Lacorte Dec 12 '16 at 10:50