Reputation: 265
There are two apps. App1 and App2. App1 needs to call remote service declared in App2. As both apps are in different process,
How to pass RemoteService of app2 in bindservice method in app1. I m using Messenger framework for IPC communication.
Upvotes: 0
Views: 130
Reputation: 69328
All that a client needs to do is create a Messenger based on the IBinder returned by the service and send a message using send().
To bind to the service use an Intent
Intent intent = new Intent();
intent.setClassName("com.sample.app2", "servicename");
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
Upvotes: 2