I recently read some API returning IBinder
, like getWindowToken()
and getApplicationWindowToken()
. Quoting the latter:
Retrieve a unique token identifying the top-level "real" window of the
window that this view is attached to. That is, this is like
getWindowToken(), except if the window this view in is a panel window
(attached to another containing window), then the token of the
containing window is returned instead.
Maybe this IPC mechanism has something to do with the View
API. Android designers are not stupid or zealous: if they require a Context
to build a View
, it means that a Context
is all they need, so building a View
must be possible with an application context, a service context and -of course!- an activity context, but an activity is not required. The Context
is just an umbrella API to retrieve resources, accessing databases, building intents and the like.
This is not the answer to your question, but maybe can serve as a helper point. I'm looking for the answer myself. Hope your question gets the attention it deserves.