I am trying to create a Service
for my application which will negotiate Bluetooth connections and data. I want this service's lifecycle to start and end with the Application
, but still be able to have specific Activities
listen for events that occur within this service (in addition an Activty
should be able to call specific methods of the Service
to write data or query connection state).
I started by creating AIDL interfaces for my callbacks and service, but I can't figure out exactly what I'm doing.
How is the best way to go about this? Thanks.
EDIT: To be clear, I do not specifically need (or want) more than one process for my application. Right now I don't have more than one; I'm just using AIDL because it is the only way I know of for a Service
to communicate with an Activity
.