IntentActions

interface IntentActions

Intent 动作接口,定义了 Android Intent 中常用的 ACTION 常量。 包含了启动 Activity 的标准动作以及系统标准广播动作。

Author

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

Functions

Link copied to clipboard

广播动作:飞行模式状态已更改。 对应: android.content.Intent.ACTION_AIRPLANE_MODE_CHANGED

Link copied to clipboard
abstract fun getBatteryChanged(): String

广播动作:电池电量状态已更改(包含电量、健康度等信息)。不能在 Manifest 中静态注册。 对应: android.content.Intent.ACTION_BATTERY_CHANGED

Link copied to clipboard
abstract fun getBatteryLow(): String

广播动作:电池电量低。 对应: android.content.Intent.ACTION_BATTERY_LOW

Link copied to clipboard
abstract fun getBatteryOkay(): String

广播动作:电池电量已恢复正常。 对应: android.content.Intent.ACTION_BATTERY_OKAY

Link copied to clipboard
abstract fun getBootCompleted(): String

广播动作:系统已完成启动。需要在 Manifest 中持有 RECEIVE_BOOT_COMPLETED 权限。 对应: android.content.Intent.ACTION_BOOT_COMPLETED

Link copied to clipboard
abstract fun getCall(): String

Activity 动作:执行呼叫,直接拨打数据中指定的号码。需要 CALL_PHONE 权限。 对应: android.content.Intent.ACTION_CALL

Link copied to clipboard

广播动作:关闭系统对话框(如通知栏、近期任务列表)。 对应: android.content.Intent.ACTION_CLOSE_SYSTEM_DIALOGS

Link copied to clipboard
abstract fun getDelete(): String

Activity 动作:从系统中删除给定的应用程序包。 对应: android.content.Intent.ACTION_DELETE

Link copied to clipboard
abstract fun getDial(): String

Activity 动作:拨打数据中指定的号码。这会显示拨号器,并填入号码,但不会直接拨出。 对应: android.content.Intent.ACTION_DIAL

Link copied to clipboard
abstract fun getEdit(): String

Activity 动作:提供对给定数据的编辑访问权限。 对应: android.content.Intent.ACTION_EDIT

Link copied to clipboard
abstract fun getGetContent(): String

Activity 动作:允许用户选择特定类型的数据并返回(例如选择文件)。 对应: android.content.Intent.ACTION_GET_CONTENT

Link copied to clipboard
abstract fun getInstallPackage(): String

Activity 动作:启动安装程序以安装新的应用程序包。 对应: android.content.Intent.ACTION_INSTALL_PACKAGE

Link copied to clipboard
abstract fun getLocaleChanged(): String

广播动作:语言环境(Locale)已更改。 对应: android.content.Intent.ACTION_LOCALE_CHANGED

Link copied to clipboard
abstract fun getMain(): String

Activity 动作:作为主要入口点启动,不接收数据。 对应: android.content.Intent.ACTION_MAIN

Link copied to clipboard
abstract fun getMediaMounted(): String

广播动作:外置媒体(SD卡)已挂载。 对应: android.content.Intent.ACTION_MEDIA_MOUNTED

Link copied to clipboard
abstract fun getMediaRemoved(): String

广播动作:外置媒体(SD卡)被移除。 对应: android.content.Intent.ACTION_MEDIA_REMOVED

Link copied to clipboard
abstract fun getPackageAdded(): String

广播动作:设备上安装了一个新的应用程序包。 对应: android.content.Intent.ACTION_PACKAGE_ADDED

Link copied to clipboard

广播动作:用户清理了数据并重新启动了应用程序包。 对应: android.content.Intent.ACTION_PACKAGE_DATA_CLEARED

Link copied to clipboard
abstract fun getPackageRemoved(): String

广播动作:设备上现有的应用程序包已被移除。 对应: android.content.Intent.ACTION_PACKAGE_REMOVED

Link copied to clipboard
abstract fun getPackageReplaced(): String

广播动作:现有的应用程序包已被替换为新版本。 对应: android.content.Intent.ACTION_PACKAGE_REPLACED

Link copied to clipboard
abstract fun getPick(): String

Activity 动作:从数据源中选择一个项目,并返回所选项目。 对应: android.content.Intent.ACTION_PICK

Link copied to clipboard
abstract fun getPowerConnected(): String

广播动作:已连接外部电源。 对应: android.content.Intent.ACTION_POWER_CONNECTED

Link copied to clipboard

广播动作:已断开外部电源。 对应: android.content.Intent.ACTION_POWER_DISCONNECTED

Link copied to clipboard
abstract fun getReboot(): String

广播动作:设备正在重启。 对应: android.content.Intent.ACTION_REBOOT

Link copied to clipboard

Activity 动作:请求用户授权特定的权限。 对应: android.content.Intent.ACTION_REQUEST_PERMISSION (API 33+) / 常用字符串

Link copied to clipboard
abstract fun getScreenOff(): String

广播动作:屏幕已关闭。 对应: android.content.Intent.ACTION_SCREEN_OFF

Link copied to clipboard
abstract fun getScreenOn(): String

广播动作:屏幕已开启。 对应: android.content.Intent.ACTION_SCREEN_ON

Link copied to clipboard
abstract fun getSend(): String

Activity 动作:向某人发送数据。接收者由系统选择(通常通过“分享”菜单)。 对应: android.content.Intent.ACTION_SEND

Link copied to clipboard
abstract fun getSendMultiple(): String

Activity 动作:投递多个数据(例如多张图片)。 对应: android.content.Intent.ACTION_SEND_MULTIPLE

Link copied to clipboard
abstract fun getSendTo(): String

Activity 动作:向指定的人发送数据。 对应: android.content.Intent.ACTION_SENDTO

Link copied to clipboard
abstract fun getSettings(): String

Activity 动作:显示系统设置。 (注:更具体的设置通常在 android.provider.Settings 中) 对应: android.content.Intent.ACTION_SETTINGS

Link copied to clipboard
abstract fun getShutdown(): String

广播动作:设备已关闭(关机)。 对应: android.content.Intent.ACTION_SHUTDOWN

Link copied to clipboard
abstract fun getTimeChanged(): String

广播动作:时间被重新设置。 对应: android.content.Intent.ACTION_TIME_CHANGED

Link copied to clipboard
abstract fun getTimeTick(): String

广播动作:当前时间已更改(每分钟发送一次)。不能在 Manifest 中静态注册。 对应: android.content.Intent.ACTION_TIME_TICK

Link copied to clipboard
abstract fun getTimezoneChanged(): String

广播动作:时区已更改。 对应: android.content.Intent.ACTION_TIMEZONE_CHANGED

Link copied to clipboard
abstract fun getUserPresent(): String

广播动作:用户解锁了设备。 对应: android.content.Intent.ACTION_USER_PRESENT

Link copied to clipboard
abstract fun getView(): String

Activity 动作:向用户显示数据。这是最常用的动作,根据数据类型打开相应的应用(如浏览器打开网址、相册打开图片)。 对应: android.content.Intent.ACTION_VIEW

Link copied to clipboard
abstract fun getWebSearch(): String

Activity 动作:执行 Web 搜索。 对应: android.content.Intent.ACTION_WEB_SEARCH