Difference between intent and intenfilter in android

Hello friends can anyone say what is the use of an intent filter and what is the difference between a movie of intent and intent

thanks

+4
source share
3 answers

Intent is an object passed to Context.startActivity (), Context.startService () or Activity.startActivityForResult (), etc. to start an action or get an existing action to do something new.

While an Intent filter describes a feature of a component (e.g. actions, services, and broadcast receivers)

See this for more details.

+4
source

Intent are used to start a new activity from the current activity. Two ways
1) Activity.startActivity (intention); 2) Activity.startActivityForResult (intent, rqwuestCode); // The above thing you need to add to the .java file

The intent filter to specify in the manifeast file.

// Intent filter is used for the broadcast receiver. Whenever an intent filter condition is met, Android runs this action.

+1
source

The goal is an object that can hold the activity of os or another application and its data in the form of uri. It starts using startActivity (aim-obj) .. \ n, while IntentFilter can retrieve activity information in os or other applications.

0
source

All Articles