Answers

Question and Answer:

  Home  Team Leader Android Developer

⟩ Explain me what is the difference between an implicit intent and explicit intent?

There are two types of Intent implicit and explicit intent, let see some more difference between them.

Implicit: Implicit intent is when you call system default intent like send email, send SMS, dial number.

For example,

Intent sendIntent = new Intent();

sendIntent.setAction(Intent.ACTION_SEND);

sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);

sendIntent.setType("text/plain")

startactivity(sendIntent);

Explicit: Explicit intent when you call you're on application activity from one activity to another

For example, first activity to second activity:

Intent intent = new Intent(first.this, second.class);

startactivity(intent);

 201 views

More Questions for you: