a base android <intent-filter>


<Intent-filter>
<Intent-filter Android: icon = "the drawable Resource"
               Android: label = "String Resource"
               Android: priority = "Integer">
    <Action>
    <category>
    <Data>
</ Intent-filter>
Filter
priority: priority default is 0, the higher the priority digital experience
 
<action>
<Action Android: name = "String" />
   Action
   1. <intent-filter> element must contain one or more <action> element
   2. For operations defined, preferably an application package name prefixed in order to ensure uniqueness

<category>
<category Android: name = "String" />
   Type
   1. In order to receive an implicit intent, you must include CATEGORY_DEFAULT categories intent filter
   2. The method startActivity () and startActivityForResult () will be deemed for all intents declared CATEGORY_DEFAULT category.
   If you do not declare it in the intent filter, there would be an implicit intent to parse your activities.
   3. custom category should use the package name as a prefix to ensure that they are unique.

 
android.intent.category.ALTERNATIVE: activity is an optional user browsing data
android.intent.category.BROWSABLE: activities can be safely used browser must support this category
android.intent.category.DEFAULT: If the activity is performed on the data indeed province actions (clicks, center press) is an option, you need to set this category
android.intent.category.DEVELOPMENT_PREFERENCE: activity is a settings panel (panel Development preference)
android.intent.category.EMBED: able to superiors (parent) activity operation.
android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST: is used as the code under test instrument testing framework
android.intent.category.GADGET: This activity may be embedded in the host activity (activity that Hosting Gadgets IS)
android.intent.category.HOME: Main screen (activity), the first activity after the display device startup
android.intent.category.LAUNCHER: Activity should be displayed at the top of the launcher in
android.intent.category.PREFERENCE: activity is provided a panel (Panel by the preference)
android.intent.category.SAMPLE_CODE: it was used as a sample code example (not part of the common user experience)
android.intent.category.SELECTED_ALTERNATIVE: For selected user data, which is an optional Activity operation
android.intent.category.TEST: using as a test object, is not part of the normal user experience
android.intent.category.UNIT_TEST: unit tests should be used (by test harness to run)
android.intent.category.WALLPAPE: this activity can been set for the device wallpaper
android.intent.category.TAB: this activity should be used as a tab in the TabActivity
 
<data>
<data android:scheme="string"
      android:host="string"
      android:port="string"
      android:path="string"
      android:pathPattern="string"
      android:pathPrefix="string"
      android:mimeType="string" />
URI format: [scheme:] [// host : port] [path]
eg: http: //192.168.1.1: 8080 / test / aabb
scheme:
   scheme part of the URI. This is the URI specified minimum basic properties; must be at least one scheme property to filter, otherwise the other URI properties did not make sense.
   The above example is http scheme.
host:
   such as the above is 192.168.1.1 Host
Port:
   such is above 8080 Port
path:
   to match the full path: the above example, / test / aabb is path
pathPattern:
   use expressions to match the whole path.
pathPrefix:
   to match the beginning of the path: the above example, the set pathPrefix / test can be carried out to match the
mimeType:
   Data Type
   Note: the different formal RFC MIME type, MIME type matching Android framework is case-sensitive . Therefore, you should always use lowercase letters specified MIME type.
   mimeType also be used to match the Intent. For example, when you use Intent.setType ( "text / plain") ,
   then the system will match to all registered android: mimeType = "text / plain " of Activity,
   It should be noted that very Intent.setType (), Intent. setData, Intent.setDataAndType () these three methods!
 
   After calling mimeType setType provided, then data is set to null;
   setting data after setData call, then mimeType set to null;
   will be provided with data while the rear setDataAndType mimeType call.
Match symbol:
   "*" to match zero or more, such as: "A *" match "A", "AA", "AAA" ...
   "." Matches any character, such as:. " "match" A "," B "," C "...
    . Therefore," * "matches any character is 0 or more, such as:". * html "match" abchtml "," chtml " , "html", "sdf.html" ...
escape:
    because when read Xml when the "\" is treated as an escape character (when pathPattern before it is used as an escape),
    so there needs twice escaped, read Xml is once again in use is in pathPattern.
Such as: "*" this character should be written as "\\ *", "\" This character should be written as "\\."

Guess you like

Origin www.cnblogs.com/jtzp007/p/11100189.html