Created
December 30, 2016 06:01
-
-
Save manishkpr/41ae4d8d8b732791c4ef67439f41c38e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.aidlserver; | |
import android.app.Service; | |
import android.content.Intent; | |
import android.os.IBinder; | |
import android.os.RemoteException; | |
public class ArithmeticService extends Service{ | |
@Override | |
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() { | |
@Override | |
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