Hi friends can anybody tell what is the use of intent filter and what is difference between intent and intent filter
Thanks
An Intent is an object passed to Context.startActivity(),Context.startService() or Activity.startActivityForResult() etc. to launch an activity or get an existing activity to do something new.
While an Intent filter describes a capability of the component(like activities, services, and broadcast receivers )
For more details see this
Intent's are used to start new activity from the current activity. With two ways
1) Activity.startActivity(intent);
2) Activity.startActivityForResult(intent,rqwuestCode);
//The above thing's you need to put in .java file
Intent-filter you need to mention on manifeast file.
// Intent filter are used for broadcast receiver. Whenever the intent filter condition is match the android OS will launch that activity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With