Created
February 8, 2013 22:02
-
-
Save nalitzis/4742310 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @Override | |
| public IBinder onBind(Intent intent) { | |
| return binder; | |
| } | |
| private final IMultiplier.Stub binder = new IMultiplier.Stub() { | |
| @Override | |
| public void multiply(final int a, final int b) throws RemoteException { | |
| final int result = a*b; | |
| Handler handler = new Handler(Looper.getMainLooper()); | |
| handler.post(new Runnable(){ | |
| @Override | |
| public void run() { | |
| Toast.makeText(getApplicationContext(), a+"*"+b+"= "+result, Toast.LENGTH_SHORT).show(); | |
| } | |
| }); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment