What is the difference between an implicit intent and explicit intent?

deepak singh
Posts: 686
Joined: Fri Sep 30, 2016 4:19 pm

What is the difference between an implicit intent and explicit intent?

Postby deepak singh » Mon Oct 24, 2016 2:33 pm

What is the difference between an implicit intent and explicit intent?

rameshkhd
Posts: 1279
Joined: Sun Aug 28, 2016 10:45 am

Re: What is the difference between an implicit intent and explicit intent?

Postby rameshkhd » Mon Oct 24, 2016 2:33 pm

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

1) implicit:-
Implicit intent when you call system default intent like send email, send SMS, dial number etc
e.g.:

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType("text/plain")
startactivity(sendIntent);

2) Explicit :-
Explicit intent when you call you're on application activity from one activity to another
e.g. first activity to second activity

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


Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest