Android Remote Service
This tutorial explains how to create a remote service and connect to it from an application using AIDL. Android has got good documentation of all the concepts but took me some time to get it working.
The idea is my application should connect to a background service where the business logic lies and get data. Since the background service runs in a separate address space from the another application we need some form of IPC to connect to it and get data. AIDL provides this mechanism in Android.
My test application consists of two text boxes and a submit button. When two numbers are input it gives the sum. The interface is specified in an AIDL file which should be located in both the service and the application at same location.
The code is attached here. Just import this to eclipse and run.