Okay, come on:
1 - setType () :
Sets an explicit MIME data type.
- This is used to create intents that only specify one type and not data, for example, to indicate the type of data that should return.
- This method automatically clears all data that has been previously defined (for example, by setData (Uri)).
Note: The MIME match type in the Android scope is case sensitive, as opposed to the formal MIME RFC types. As a result, you should always write your MIME types with lower case letters, or use normalizeMimeType (String) or setTypeAndNormalize (String) to ensure that it is converted to lowercase.
parameters:
type: String: MIME type of data to be handled by this intent
return:
Returns the same intent object, to chain multiple calls into a single statement.
2 - putExtra and setData:
No, they are not similar methods, see: putExtra () :
- Adds extended data to the intent. The name must include a prefix of the package, for example, the com.android.contacts application, it would use names like "com.android.contacts.ShowAll".
setData () :
- Defines the data that it intends to operate from now on. This method automatically clears any type that was previously set by the setType (String) or setTypeAndNormalize (String).
3 - setFlags ():
Defines special flags that control how this intent will be handled. Most of the values here depend on the type of component being executed by Intent, specifically the FLAG_ACTIVITY_ * flags are all for use with Context.startActivity () and the FLAG_RECEIVER_ * flags are all for use with Context.sendBroadcast ().
See Tasks and Back Stack for important information on how to some of these options affect the behavior of your application.
No more is this and from what I could see it seems that you are starting now with programming for android, so, here are some tips:
1 - learn English;
2 - Study face, this answer I translated from the google developer console that was easily found when I requested "intent.addflags" in the search field.
Light and peace!