Javatpoint Logo
Javatpoint Logo

Kotlin Android Implicit Intent

Android Implicit Intent invokes the component of another app to handle the request. It does not specify the component name specifically.

For example, if we want to share data using Intent, it invokes the relevant component to fulfill the request.

Kotlin Android Implicit Intent

Kotlin Android Implicit Intent Example Invoking URL

In this example, we will invoke the URL using Implicit Intent clicking on Button.

activity_main.xml

Add the following code in activity_main.xml file. In this activity, we use a Button to invoke Intent.

MainActivity.kt

Add the following code in the MainActivity.kt class. In this class, we are invoking the URL on clicking the button using Implicit Intent. To invoke this intent, we are passing the action type and URL. The startActivity() method is used to start the Intent.

Output:

Kotlin Android Implicit Intent Kotlin Android Implicit Intent
Kotlin Android Implicit Intent
Next Topic#





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA