What is the purpose of & ldquo; Android.intent.category.DEFAULT & rdquo;

advertisements

what is the purpose of giving "android.intent.category.DEFAULT" in the category field of intent filters ? what does it mean?


Categories are used for implicit Intents. So, If your Activity might be started by an implicit Intent when no specific category is assigned to it, its Intent filter should include this category.( even if you have other categories in the Intent filter). If you are sure that your activity must be called with any other Category don't use the Default.

Setting Category to Default doesn't mean that this Activity will be used by default when your app launches. The Activity just says to system that " Oh I could be started, even if the starter Intent's category is set to Nothing at all ! "