Sr. Android Developer Question:

Explain me what is the difference between an implicit intent and explicit intent as Sr. Android Developer?

Sr. Android Developer Interview Question
Sr. Android Developer Interview Question

Answer:

Implicit Intent is used whenever you are performing an action. For example, send email, SMS, dial number or you can use a Uri to specify the data type. For example:

☆ Intent i = new Intent(ACTION_VIEW,Uri.parse("<a href="https://www.globalguideline.com">https://www.globalguideline.com</a>"));
☆ startActivity(i);

Explicit, on the other hand, helps you to switch from one activity to another activity(often known as the target activity). It is also used to pass data using putExtra method and retrieved by other activity by getIntent().getExtras() methods.

For example:
☛ Intent i = new Intent(this, Activitytwo.class); #ActivityTwo is the target component
☛ i.putExtra("Value1","This is ActivityTwo");
☛ i.putExtra("Value2","This Value two for ActivityTwo");
☛ startactivity(i);


Previous QuestionNext Question
Do you know what is AAPT?Tell us what is an Activity? Which method is implemented by all subclasses of an Activity?