Posts

Intent

Image
Intent is basically a message that is passed between components (such as Activities , Services , Broadcast Receivers , and Content Providers ). So, it is almost equivalent to parameters passed to API calls. The fundamental differences between API calls and intents' way of invoking components are: API calls are synchronous while intent-based invocations are asynchronous . API calls are compile time binding while intent-based calls are run-time binding . Of course, Intents can be made to work exactly like API calls by using what are called explicit intents , which will be explained later. But more often than not, implicit intents are the way to go and that is what is explained here. One component that wants to invoke another has to only express its' intent to do a job. And any other component that exists and has claimed that it can do such a job through intent-filters , is invoked by the android platform to accomplish the job. This means, both the com...