The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
Earlier in this book, we covered using services by sending commands to them to be processed. That “command pattern” is one of two primary means of interacting with a service — the binding pattern is the other. With the binding pattern, your service exposes a more traditional API, in the form of a “binder” object with methods of your choosing. On the plus side, you get a richer interface. However, it more tightly ties your activity to your service, which may cause you problems with configuration changes.
Either the command pattern or the binding pattern can be used, if
desired, across process boundaries, with the client being some
third-party application. In either case, you will need to export
your service via an
<intent-filter>. And, in the case of the binding
pattern, your “binder” implementation will have some restrictions.
This chapter covers the binding pattern for local services, plus inter-process commands and binding (a.k.a., remote services).
Understanding this chapter requires that you have read the chapters on:
The preview of this section was traded for a bag of magic beans.
The preview of this section was the victim of a MITM ('Martian in the middle') attack.
The preview of this section did not survive Thanos's finger snap.
The preview of this section was lost due to a rupture in the space-time continuum.
The preview of this section is being chased by zombies.
The preview of this section was abducted by space aliens.
The preview of this section is sleeping in.