What is the different between explicit and implicit intent in android ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

What is the different between explicit and implicit intent in android ?

22nd Apr 2017, 8:10 AM
vismay thakkar
vismay thakkar - avatar
2 Respostas
+ 3
Explicit Intent: Explicit intent names the component. Implicit Intent: Implicit Intents have not specified a component. E.g: The java class which should be called Implicit intent asked the system to perform a service without telling the system which java class should do this service.
22nd Apr 2017, 9:44 AM
Nikita Galchenko
Nikita Galchenko - avatar
+ 2
Explicit intents are those that are called specifically using a class. For example starting another activity in your app is an explicit intent because you define the component class. Example: Intent intent = new Intent(this, SettingsActivity.class); Implicit intents are those that are handled by the Android OS. For example sending an intent to open a web page. This is implicit because you are not defining what component class to use. Instead the Android OS registers an intent to all the web browsers and at most times, your default Web browser will open. Example: Intent intent = new Intent(Intent.ACTION_VIEW);
22nd Apr 2017, 10:25 AM
Hassie
Hassie - avatar