category
16lz
2021-01-23
<category android:name="string" />
<intent-filter>
-
android:name
- The name of the category. Standard categories are defined in the
Intent
class asCATEGORY_name
constants. The name assigned here can be derived from those constants by prefixing "android.intent.category.
" to thename
that followsCATEGORY_
. For example, the string value forCATEGORY_LAUNCHER
is "android.intent.category.LAUNCHER
".Note:In order to receive implicit intents, you must include the
CATEGORY_DEFAULT
category in the intent filter. The methodsstartActivity()
andstartActivityForResult()
treat all intents as if they declared theCATEGORY_DEFAULT
category. 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.
<action>
<data>
<类别 的Android:名称 = “ 字符串 ” />
<意图过滤器>
-
安卓:名称
- 的类别的名称。标准类别的定义
意图
类CATEGORY_名
常量。这里分配的名字可以从这些常数由前缀派生“android.intent.category。
”到名称
后面CATEGORY_
。例如,对于字符串值CATEGORY_LAUNCHER
是“android.intent.category.LAUNCHER
”。注:为了获得隐含的意图,你必须包括
CATEGORY_DEFAULT
的意图过滤类别。方法startActivity()
和startActivityForResult()
把所有的意图,如果他们宣布CATEGORY_DEFAULT
类别。如果你没有在你的意图过滤器声明它,没有隐含意图将解析为您的活动。自定义类别应该使用包名作为前缀,以确保它们是唯一的。
<操作>
<数据>
更多相关文章
- Android必备:Activity 活动 和 Intent 意图 的学习整理
- Android核心分析(20)----Android应用程序框架之无边界设计意图
- Android基本操作1(意图使用、界面转换、按键操作、文本传递)
- 【Android 设计】:启航_ 创作意图 | 设计原则
- Android 设置隐式意图
- 【安全】Android O 中的 Seccomp 过滤器
- 过滤器详解的10篇内容推荐
- 基于Cookie使用过滤器实现客户访问登录功能的详解
- asp.net之ActionFilter过滤器