Interviewer And Interviewee Guide

Sr. Android Developer Interview Question:

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

Submitted by: Muhammad
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);
Submitted by: Muhammad

Read Online Sr. Android Developer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.