According documentaion on Developer's forum, this is how I can bind my service using AIDL:
/* Establish a couple connections with the service, binding by interface names.This allows other applications to be installed that replace the remote service by implementingthe same interface.*/
bindService(new Intent(IRemoteService.class.getName()),mConnection, Context.BIND_AUTO_CREATE);
Now I have application A, which has Service class and AIDL interfaces.
And I have application B through which I wish to access Service class of Application A , using methods exposed ny AIDL in application A.
So I have created exactly same pacakge for AIDLs inside application B and have pasted AIDLs from App A.
But when I'm trying to bind service using above mechanism mentioned in documentation it tells me:
Unable to start service Intent { act com.example.service.MyService } U=0: not found
In App A Service
exported="true".
Now Insted of this approach I added Intent Filter to my service in app A and tried to specify explicit intent using
intent.setClassName(String packageName, String className)
And now it is working!
So is there something I missed out while referring original documentation ? when that approached will be used?