SYNTAX:
<category android:name="string" />
CONTAINED IN:
<intent-filter>
DESCRIPTION:
Adds a category name to an intent filter. See Intents and Intent Filtersfor details on intent filters and the role of category specifications within a filter.
ATTRIBUTES:
android:name
The name of the category. Standard categories are defined in the Intentclass as CATEGORY_nameconstants. The name assigned here can be derived from those constants by prefixing " android.intent.category." to the namethat follows CATEGORY_. For example, the string value for CATEGORY_LAUNCHERis " android.intent.category.LAUNCHER".

Note:In order to receive implicit intents, you must include theCATEGORY_DEFAULTcategory in the intent filter. The methodsstartActivity()andstartActivityForResult()treat all intents as if they declared theCATEGORY_DEFAULTcategory. If you do not declare it in your intent filter, no implicit intents will resolve to your activity.

Custom categories should use the package name as a prefix, to ensure that they are unique.

INTRODUCED IN:
API Level 1
SEE ALSO:
<action>

<data>


句法:
<类别 的Android:名称 = 字符串 />
包含在:
<意图过滤器>
描述:
添加一个类别名称,一个意图过滤器。见 意图和意图过滤器上的意图过滤器的详细信息和类别规格的过滤器中的作用。
属性:
安卓:名称
的类别的名称。标准类别的定义 意图CATEGORY_常量。这里分配的名字可以从这些常数由前缀派生“ android.intent.category。”到 名称后面 CATEGORY_。例如,对于字符串值 CATEGORY_LAUNCHER是“ android.intent.category.LAUNCHER”。

注:为了获得隐含的意图,你必须包括CATEGORY_DEFAULT的意图过滤类别。方法startActivity()startActivityForResult()把所有的意图,如果他们宣布CATEGORY_DEFAULT类别。如果你没有在你的意图过滤器声明它,没有隐含意图将解析为您的活动。

自定义类别应该使用包名作为前缀,以确保它们是唯一的。

介绍了:
API级别1
也可以看看:
<操作>
<数据>

更多相关文章

  1. Android必备:Activity 活动 和 Intent 意图 的学习整理
  2. Android核心分析(20)----Android应用程序框架之无边界设计意图
  3. Android基本操作1(意图使用、界面转换、按键操作、文本传递)
  4. 【Android 设计】:启航_ 创作意图 | 设计原则
  5. Android 设置隐式意图
  6. 【安全】Android O 中的 Seccomp 过滤器
  7. 过滤器详解的10篇内容推荐
  8. 基于Cookie使用过滤器实现客户访问登录功能的详解
  9. asp.net之ActionFilter过滤器

随机推荐

  1. Android防止内存泄露
  2. Android简易计算器----布局_菜单_提示框
  3. Android(安卓)ndk探索之一(利用Android(安
  4. [Android]继承式UI界面布局设计
  5. (转)支付宝 Android(安卓)版使用的开源组件
  6. 别老说要买 iPhone6,三分钟就让你手机价值
  7. Android(安卓)SQLite 数据库详细介绍
  8. Android加载Bitmap出现OutofMemoryError
  9. 直接用 Chrome 扩展来回复 Android(安卓)
  10. Android中的dip,dp,sp,px