DEV Community

Autri01
Autri01

Posted on

Intents-Android

What is Intent in Android?

In Android, it is quite usual for users to witness a jump from one application to another as a part of the whole process, for example, searching for a location on the browser and witnessing a direct jump into Google Maps or receiving payment links in Messages Application (SMS) and on clicking jumping to PayPal or GPay (Google Pay). This process of taking users from one application to another is achieved by passing the Intent to the system.

Intents could be Implicit, for instance, calling intended actions and explicit as well, such as opening another activity after some operations like onClick or anything else.

Android intents are mainly used to:

Start the service
Launch an activity
Display a web page
Display a list of contacts
Broadcast a message
Dial a phone call etc.

Types of Android Intents
There are two types of intents in android:

Implicit and
Explicit.

  1. Implicit Intent

Implicit Intent doesn’t specify the component.In such case, intent provides information of available components provided by the system that is to be invoked.

For example, you may write code to view the webpage.

  1. Explicit Intent

Explicit Intent specifies the component. In such a case, intent provides the external class to be invoked.

Top comments (0)