IntentCategories

Intent 类别接口,定义了 Android Intent 中常用的 CATEGORY 常量。 类别提供了关于要执行的操作的额外信息(例如:这是一个启动器 Activity,或者这应该在浏览器中打开)。

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun getAppMarket(): String

应用程序市场类别。用于启动应用市场(如 Google Play)以显示有关应用程序的详细信息。 对应: android.content.Intent.CATEGORY_APP_MARKET

Link copied to clipboard
abstract fun getBrowsable(): String

可浏览类别。Activity 可以安全地由浏览器调用以显示链接引用的数据(例如网页 URL)。 对应: android.content.Intent.CATEGORY_BROWSABLE

Link copied to clipboard
abstract fun getCarDock(): String

车载停靠类别。当设备放入车载底座时启动。 对应: android.content.Intent.CATEGORY_CAR_DOCK

Link copied to clipboard
abstract fun getDefault(): String

默认类别。如果 Activity 想要接收隐式 Intent,通常需要在 Intent Filter 中包含此类别。 对应: android.content.Intent.CATEGORY_DEFAULT

Link copied to clipboard
abstract fun getDeskDock(): String

桌面停靠类别。当设备放入桌面底座时启动。 对应: android.content.Intent.CATEGORY_DESK_DOCK

Link copied to clipboard

开发偏好设置类别。出现在开发者选项中的设置面板。 对应: android.content.Intent.CATEGORY_DEVELOPMENT_PREFERENCE

Link copied to clipboard
abstract fun getHome(): String

主屏幕类别。这是主屏幕(Home Screen)Activity,即设备启动时显示的第一个屏幕。 对应: android.content.Intent.CATEGORY_HOME

Link copied to clipboard
abstract fun getInfo(): String

信息类别。提供有关包的信息(通常用于 "App Info" 界面)。 对应: android.content.Intent.CATEGORY_INFO

Link copied to clipboard
abstract fun getLauncher(): String

启动器类别。Activity 应该作为顶级应用程序入口点显示在应用程序启动器(桌面)中。 对应: android.content.Intent.CATEGORY_LAUNCHER

Link copied to clipboard
abstract fun getLeanbackLauncher(): String

电视主屏幕类别。在 Android TV 上用作主屏幕。 对应: android.content.Intent.CATEGORY_LEANBACK_LAUNCHER

Link copied to clipboard
abstract fun getOpenable(): String

可打开类别。用于 IntentActions.getGetContent,指示只能返回可以用 android.content.ContentResolver.openFileDescriptor 打开的数据流。 对应: android.content.Intent.CATEGORY_OPENABLE

Link copied to clipboard
abstract fun getPreference(): String

偏好设置类别。该 Activity 是一个偏好设置面板。 对应: android.content.Intent.CATEGORY_PREFERENCE

Link copied to clipboard
abstract fun getSampleCode(): String

示例代码类别。仅用于示例代码,不应在普通应用中使用。 对应: android.content.Intent.CATEGORY_SAMPLE_CODE

Link copied to clipboard
abstract fun getTab(): String

标签页类别。旨在作为包含它的 Activity 中的一个标签页使用。 对应: android.content.Intent.CATEGORY_TAB

Link copied to clipboard
abstract fun getUnitTest(): String

单元测试类别。作为一个单元测试运行。 对应: android.content.Intent.CATEGORY_UNIT_TEST