Question fellow programmers. Let's say I have a stand alone application in it's own .apk and I have another .apk which contains a service. How do I start/stop the service and listen to intents from the standalone application? Would service binding work in this case?
I have done application with their own services in the same .apk but unfortunately I have to split them up, each with their own apk.
Thank you very much.
I don't see why this would be any different than what you would do in the intraapp case. You can just check to see if the intent will succeed like this. You will then bind to the service using the package and class name, just as you would in the same app. Of course, it depends on whether or not you want to use just intents, or whether you want to implement an AIDL interface. So, in reality, besides checking whether the app is actually installed, there shouldn't be any real change.
You should also note that you should protect the ability to get the intent with a permission, especially if you are doing something privileged (usually you are). Otherwise your app could be a potential target for confused deputy attacks.