Instantly share code, notes, and snippets.

What would you like to do?
package com.example.aidlserver;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
public class ArithmeticService extends Service{
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return mBinder;
* IRemote defnition is available here
private final IRemote.Stub mBinder = new IRemote.Stub() {
public int add(int a, int b) throws RemoteException {
// TODO Auto-generated method stub
return (a + b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment