‫The second type of intents is the implicit intent.
‫An implicit intent is used when you want to perform an action, such as opening a web page or sending
‫an email, but you don't specify a particular target component.
‫Instead, you declare an action to be performed, and the Android system determines the appropriate
‫components that can handle that action.
‫Here's an example of using an implicit intent to open a web page.
‫So inside the main activity I'll create another button.
‫And I'll drag and drop it to here and invert the constraints.
‫Then let me go back to the main activity and initialize the button.
‫Go down.
‫Then when the user clicks on this web, I need to handle the click event using this lambda expression
‫that it is passed to the set on click listener interface.
‫Here I need to open a web page.
‫I need to create an implicit intent with the action view and a URL.
‫Let me create a val called intent.
‫Implicit intent equals to intent.
‫And here I need to pass two parameters the action and the URL intent dot.
‫There are a lot of actions in intent.
‫Class intent is a class in Android that represents an intention to perform an action.
‫It's used to request an action from another component, such as starting an activity, broadcasting
‫a message, or invoking a service.
‫Then I'll use action.
‫Underscore a view.
‫Action underscore view.
‫This is a constant string representing the standard action of a viewing data.
‫It's commonly used when you want to open a URL, display an image, or show an any content that can
‫be viewed.
‫Then I need to pass another parameter, which is the uri uri dot pass, and here I'll specify http as
‫google.com.
‫Uri dot pass is a method that creates a Uri object from the given string.
‫In this case, it's used to create a Uri object representing the URL.
‫Google.com a Uri Uniform Resource Identifier is a way to identify resources, and it's often used to
‫represent your eyes like web addresses.
‫So this line, this variable is an instance to set up and perform the action.
‫Action a view on the data represented by the Uri.
‫This could open a web browser to display the web page.
‫Google.com.
‫When you use this intent with methods like start activity, the system looks for an appropriate app
‫to handle the view action with the provided data.
‫For example, if you want to open a browser, you will not open the gallery.
‫Android system will not open the messages or phone, it will open applications that are specific for
‫browsing.
‫Then I need to call start activity method.
‫As I told you, start activity is used to execute the intents implicit and let me run.
‫And this is our application.
‫Go to Google.
‫Let me click on it.
‫And here we go.
‫It opens the only browser in my emulator which is Chrome.
‫And here we go.
‫This is our Chrome displaying google.com Uri link.
‫This is how we use implicit intents in Android.