From a088275ef3211d30a9f941d19c5859427948233e Mon Sep 17 00:00:00 2001
From: Jonathan Dormody
Note that this is implemented as an inner class only keep the sample + * Note that this is implemented as an inner class only keep the sample * all together; typically this code would appear in some separate class. */ public static class Binding extends Activity { private boolean mIsBound; -// BEGIN_INCLUDE(bind) private LocalService mBoundService; private ServiceConnection mConnection = new ServiceConnection() { diff --git a/samples/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java b/samples/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java index 8d0ac8c16..9c0cacd1b 100644 --- a/samples/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java +++ b/samples/ApiDemos/src/com/example/android/apis/app/MessengerServiceActivities.java @@ -21,16 +21,17 @@ import android.widget.TextView; import android.widget.Toast; public class MessengerServiceActivities { + +// BEGIN_INCLUDE(bind) /** * Example of binding and unbinding to the remote service. * This demonstrates the implementation of a service which the client will - * bind to, interacting with it through an aidl interface.
+ * bind to, interacting with it through an aidl interface. * - *Note that this is implemented as an inner class only keep the sample + * Note that this is implemented as an inner class only keep the sample * all together; typically this code would appear in some separate class. */ public static class Binding extends Activity { -// BEGIN_INCLUDE(bind) /** Messenger for communicating with service. */ Messenger mService = null; /** Flag indicating whether we have called bind on the service. */