Android Implicit Intents Implicit and Explicit Intents

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


An explicit intent is used for starting an activity or service within the same application package. In this case the name of the intended class is explicitly mentioned:

Intent intent = new Intent(this, MyComponent.class);

However, an implicit intent is sent across the system for any application installed on the user's device that can handle that intent. This is used to share information between different applications.

Intent intent = new Intent("com.stackoverflow.example.VIEW");

//We need to check to see if there is an application installed that can handle this intent
if (getPackageManager().resolveActivity(intent, 0) != null){ 
    //Handle error

More details on the differences can be found in the Android Developer docs here: Intent Resolution

Got any Android Question?