0

i came across but didnt found meaningful for

Intent myIntent = new Intent("myIntentAction");

what is the String myIntentAction job here ?? whats it for

myIntent.addCategory("android.intent.category.DEFAULT");

and why we call this ? what is the String "android.intent.category.DEFAULT" purpose here?

detail explanation would be appreciated ... thanks

Atif Afridi
  • 61
  • 2
  • 12
  • [purpose of categories](http://stackoverflow.com/questions/7365732/what-are-the-purpose-of-intent-categories) [purpose of a default category](http://stackoverflow.com/questions/5727828/what-is-the-purpose-of-android-intent-category-default) – paperflyy Feb 20 '17 at 10:44

1 Answers1

0

Set if the activity should be an option for the default action (center press) to perform on a piece of data. Setting this will hide from the user any activities without it set when performing an action on some data. Note that this is normally -not- set in the Intent when initiating an action -- it is for use in intent filters specified in packages.

Refer this and this

and for more refer this

It is used for clarifying the intent Like this there are several categories

Community
  • 1
  • 1
Kiran Benny Joseph
  • 6,755
  • 4
  • 38
  • 57
  • and example would be best because i have been through this but i didnt understand the following two line Set if the activity should be an option for the default action (center press) to perform on a piece of data. Setting this will hide from the user any activities without it set when performing an action on some data. what is the center press – Atif Afridi Feb 20 '17 at 11:15
  • @AtifAfridi refer [this](http://stackoverflow.com/questions/5727828/what-is-the-purpose-of-android-intent-category-default) – Kiran Benny Joseph Feb 20 '17 at 11:46
  • how can i tag someone in my question on stackoverflow – Atif Afridi Mar 07 '17 at 05:42
  • I don't know.But you can ask this kind of question in [this](https://meta.stackoverflow.com/) – Kiran Benny Joseph Mar 07 '17 at 05:48