Types of Intent: Implicit and Explicit Intents in android Kotlin |Kotlin Implicit & Explicit Intents

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to my channel today in this video tutorial we are going to learn about unpleasant intent and explicit intent and android so let's start so i have created this project in which i have this main activity dot xml file in which i created these two button and i have connected these two button here in our main activity.kt file here and i have also created let's click event now we will discuss first implicit intent so amplicident it does not call an android component directly but is it does an action uh for example if we call the action we intend and pass a uri to it then it will open on the browser that is available on your android or any other the application that can open url it will um open that so let's uh create an example of uh employee intent so here i will use wall intent equals intent and here i will use a intent dot action so this is capital action view and then it takes the uri so i'll use uri dot pass and then it takes our url so i'll go to google chrome and copy this google url google.com and now i'll paste it here and then i'll start the intent so i'll use start activity and then i will pass in the intent now let's run the application um i need an n here let's run the application and let's check this if it is opening a browser so now the application is running on this uh emulator so if i click on this implicit intent button so now you can see that it is open this browser and open google.com now if you have different uh browsers on your device and no one is set to default so it will show you all the browser and you can select them then that browsers now we will discuss explicit intent so i'll go back and i'll come to my code and main activity.kt file so explicit intent are used when you call a specific component in android for example when you call an activity in your application or call a service then it is called an explicit intent so an explicit intent is used in the application itself where and one activity can switch to another activity and uh with explicit intent you can pass data as well from one activity to another activity so i'll create an intent here call intent equals intent and now i'll use uh this comma and here i will use second activity so second uh this is capitals to second activity and then full column full column and class dot java and now i'll start the activity so this become explicit and then we have it explicitly called this second activity in this one we do not know which browser we are calling but we have uh given this action view to android system and in android system will decide that which uh application it will open and uh will go to this url and in this we explicitly uh says to this uh android uh system or this implication that we are going from this uh main activity to this second activity kt dot kt file so if i run this right now now the application is again running so if i come here and now if i click on this explicit intent so it will take us to this second activity i'll go back and now if i click on this implicit intent it will takes us to the browser so that's all for today i hope you like the video if you like the video please like subscribe and comment thank you
Info
Channel: Programming Guru
Views: 36
Rating: undefined out of 5
Keywords: Programming Guru, Guru Programming, programming, gurru, programminggurru, what is an intent, what is intent, what are intent, explicit intent, implicit intent, what is explicit intent, what is implicit intent, explicit and implicit intent tutorial, intent in android, intent in android studio, intent in android tutorial, intents in android, intent tutorial, android explicit intents, android implicit intents, android explicit vs implicit intents, android intent basic example
Id: HH1WfYESsAE
Channel Id: undefined
Length: 5min 10sec (310 seconds)
Published: Tue Dec 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.