Changes

Jump to: navigation, search

Android Local Bound Services – A Worked Example

30 bytes added, 19:59, 1 July 2013
Binding the Client to the Service
For the purposes of this tutorial, the client is the LocalBoundActivity instance of the running application. As previously noted, in order to successfully bind to a service and receive the IBinder object returned by the service’s onBind() method, it is necessary to create a ServiceConnection subclass and implement onServiceConnected() and onServiceDisconnected() callback methods. With these requirements in mind, edit the LocalBoundActivity.java file and modify it as follows:
 
<google>BUY_ANDROID</google>
<pre>

Navigation menu