Android Implicit Intents with Examples

  Keywords : Android implicit intents are used to specify an action that can invoke by any app on the device to perform an action, Android implicit intents won’t specify any name of app component

Here we will learn implicit intents in android with examples and how to use android implicit intents in applications to invoke an action and how that action can handled by other apps with examples.

Android Implicit Intents

In android, Implicit Intents won’t specify any name of the component to start, instead it declare an action to perform and it allow a component from other app to handle it. For example, by using implicit intents we can request another app to show the location details of user or etc.


Following is the pictorial representation of how Implicit intents send a request to android system to start another activity.


Android Implicit Intents Process Flow


If you observe above image Activity A creates an intent with required action and send it to an android system using startActivity() method. The android system will search for an intent filter that matches the intent in all apps. Whenever the match found the system starts matching activity (Activity B) by invoking onCreate() method.


In android when we create an implicit intents, the android system will search for matching component by comparing the contents of an intent with intent filters which defined in manifest file of other apps on the device. If matching component found, the system starts that component and send it to Intent object. In case if multiple intent filters are matched then the system display a dialog so that user can pick which app to use.


In android, Intent Filter is an expression in app’s manifest file and it is used to specify the type of intents that the component would like to receive. In case if we create an Intent Filter for activity, there is a possibility for other apps to start our activity by sending a certain type of intent otherwise the activity can be started only by an explicit intent.


Following is the simple code snippet of implicit intent in android application.


Intent intent=new Intent(Intent.ACTION_VIEW);

If you observe above implicit intent we didn’t defined any specific name of component to start, instead we defined an action (ACTION_VIEW) to open the defined URL ( in browser within the device.

Android Implicit Intent Example

Following is the complete example of implementing an implicit intent in android application.


Create a new android application using android studio and open an activity_main.xml file from \src\main\res\layout path. In case if you are not aware of creating an app in android studio check this article Android Hello World App.


<?xml version="1.0" encoding="utf-8"?>
android:ems="10" />
android:layout_centerHorizontal="true" />

Now open the main activity file from \src\main\java\com\tutlane\com.tutlane.helloworld path and write the following code to open a new browser window on button click to load given url.


package com.tutlane.intents;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends AppCompatActivity {

protected void onCreate(Bundle savedInstanceState) {
final EditText editText = (EditText)findViewById(;
        Button btn = (Button) findViewById(
new View.OnClickListener() {
public void onClick(View v) {
                String url =
                Intent intent =
new Intent(Intent.ACTION_VIEW, Uri.parse(url));

Output of Android Implicit Intent Example

When we run above example using android virtual device (AVD) we will get a result like as shown below


Android Implicit Intents Example Result or Output


When we enter website url and click on button it will open a website in new browser window in same application.


This is how we can use Android Implicit Intents in applications based on our requirements.