Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.mael.servicedistanttest;
- import android.app.Service;
- import android.content.Intent;
- import android.os.Binder;
- import android.os.IBinder;
- /**
- * Created by mael on 24/05/17.
- */
- public class DistantService extends Service {
- private final IBinder monBinder = new distantBinder();
- public class distantBinder extends Binder{
- DistantService getDistantService(){
- return DistantService.this;
- }
- }
- @Override
- public IBinder onBind(Intent intention){
- return monBinder;
- }
- public int getValeur(){
- return 123;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement