Does the term process mean I won't need to use a Messenger unless I generate a separate process under the Process and Thread guidelines?
This is correct. You need a Messenger
if you want to bind a remote service (e.g. running in another process). In this case, the only option to provide remote service with a pointer to your Handler
would be to use a Messenger
.
Is it always good practice to use a Messenger?
I would not say so. Use it when it's really needed - for remote services or if you start service without binding it. You can pack Messenger
as an extra into an Intent
and start service with it. Thus you can pass reference to a Handler
without binding a service. This is another case when Messenger
is useful.
Is passing a reference to the Handler typically a bad idea?
If you properly handle registration and unregistration of Handler
when activity starts and stops, then you should be ok. There is no need to use Messenger
for local service then. If you don't unregister handler properly, there will be memory leaks (service refers a handler, and handler refers a stopped activity).