Home | History | Annotate | Download | only in components

Lines Matching full:messenger

21       <li><a href="#Messenger">Using a Messenger</a></li>
140 <dt><a href="#Messenger">Using a Messenger</a></dt>
142 an interface for the service with a {@link android.os.Messenger}. In this manner, the service
145 is the basis for a {@link android.os.Messenger} that can then share an {@link android.os.IBinder}
147 android.os.Message} objects. Additionally, the client can define a {@link android.os.Messenger} of
150 android.os.Messenger} queues all requests into a single thread so that you don't have to design
157 IPC. The previous technique, using a {@link android.os.Messenger}, is actually based on AIDL as
158 its underlying structure. As mentioned above, the {@link android.os.Messenger} creates a queue of
332 <h3 id="Messenger">Using a Messenger</h3>
337 <p>When you need to perform IPC, using a {@link android.os.Messenger} for your interface is
338 simpler than implementing it with AIDL, because {@link android.os.Messenger} queues
342 android.os.Messenger} allows the service to handle one call at a time. If it's important
349 {@link android.os.Messenger} to provide the interface for your service. This technique allows
352 <p>Here's a summary of how to use a {@link android.os.Messenger}:</p>
357 <li>The {@link android.os.Handler} is used to create a {@link android.os.Messenger} object
359 <li>The {@link android.os.Messenger} creates an {@link android.os.IBinder} that the service
361 <li>Clients use the {@link android.os.IBinder} to instantiate the {@link android.os.Messenger}
374 <p>Here's a simple example service that uses a {@link android.os.Messenger} interface:</p>
400 final Messenger mMessenger = new Messenger(new IncomingHandler());
403 * When binding to the service, we return an interface to our messenger
418 <p>All that a client needs to do is create a {@link android.os.Messenger} based on the {@link
420 android.os.Messenger#send send()}. For example, here's a simple activity that binds to the
425 /** Messenger for communicating with the service. */
426 Messenger mService = null;
439 // service using a Messenger, so here we get a client-side
441 mService = new Messenger(service);
491 service to respond, then you need to also create a {@link android.os.Messenger} in the client. Then
494 the client's {@link android.os.Messenger} in the {@link android.os.Message#replyTo} parameter
495 of the {@link android.os.Messenger#send send()} method.</p>