diff --git a/en/application-dev/reference/apis/commonEventManager-definitions.md b/en/application-dev/reference/apis/commonEventManager-definitions.md index ba5ebf915c918fff4774a4db95e858d00be591d3..05f158ad540403b78c11b77bd4f9ca45e6ea651f 100644 --- a/en/application-dev/reference/apis/commonEventManager-definitions.md +++ b/en/application-dev/reference/apis/commonEventManager-definitions.md @@ -5,13 +5,11 @@ For details about the definition of a system common event, see [Support in @ohos **System capability**: SystemCapability.Notification.CommonEvent -## COMMON_EVENT_BOOT_COMPLETED -Indicates that the user has finished booting and the system has been loaded. -- Value: **usual.event.BOOT_COMPLETED** -- Required subscriber permissions: ohos.permission.RECEIVER_STARTUP_COMPLETED +## [COMMON_EVENT_BOOT_COMPLETED](./common_event/commonEvent-ability.md) +Indicates that the user has finished the boot process. ## COMMON_EVENT_LOCKED_BOOT_COMPLETED -(Reserved, not supported yet) Indicates that the user has finished booting and the system has been loaded but the screen is still locked. +(Reserved, not supported yet) Indicates that the user has finished the boot process but the screen is still locked. - Value: **usual.event.LOCKED_BOOT_COMPLETED** - Required subscriber permissions: ohos.permission.RECEIVER_STARTUP_COMPLETED @@ -40,31 +38,26 @@ Indicates that the device is connected to an external power supply. - Value: **usual.event.POWER_CONNECTED** - Required subscriber permissions: none - ## COMMON_EVENT_POWER_DISCONNECTED Indicates that the device is disconnected from the external power supply. - Value: **usual.event.POWER_DISCONNECTED** - Required subscriber permissions: none - ## COMMON_EVENT_SCREEN_OFF Indicates that the device screen is off and the device is in sleep mode. - Value: **usual.event.SCREEN_OFF** - Required subscriber permissions: none - ## COMMON_EVENT_SCREEN_ON Indicates that the device screen is on and the device is in interactive state. - Value: **usual.event.SCREEN_ON** - Required subscriber permissions: none - ## COMMON_EVENT_THERMAL_LEVEL_CHANGED8+ Indicates that the device's thermal level has changed. - Value: **usual.event.THERMAL_LEVEL_CHANGED** - Required subscriber permissions: none - ## COMMON_EVENT_USER_PRESENT(deprecated) (Reserved, not supported yet) Indicates that the user unlocks the device. - Value: **usual.event.USER_PRESENT** @@ -78,43 +71,36 @@ Indicates that the system time has changed as time ticks by. - Value: **usual.event.TIME_TICK** - Required subscriber permissions: none - ## COMMON_EVENT_TIME_CHANGED Indicates that the system time is set. - Value: **usual.event.TIME_CHANGED** - Required subscriber permissions: none - ## COMMON_EVENT_DATE_CHANGED (Reserved, not supported yet) Indicates that the system date has changed. - Value: **usual.event.DATE_CHANGED** - Required subscriber permissions: none - ## COMMON_EVENT_TIMEZONE_CHANGED Indicates that the system time zone has changed. - Value: **usual.event.TIMEZONE_CHANGED** - Required subscriber permissions: none - ## COMMON_EVENT_CLOSE_SYSTEM_DIALOGS (Reserved, not supported yet) Indicates that the user closes a temporary system dialog box. - Value: **usual.event.CLOSE_SYSTEM_DIALOGS** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_ADDED Indicates that a new application package has been installed on the device. - Value: **usual.event.PACKAGE_ADDED** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_REPLACED (Reserved, not supported yet) Indicates that a later version of an installed application package has replaced the previous one on the device. - Value: **usual.event.PACKAGE_REPLACED** - Required subscriber permissions: none - ## COMMON_EVENT_MY_PACKAGE_REPLACED (Reserved, not supported yet) Indicates that a later version of your application package has replaced the previous one. - Value: **usual.event.MY_PACKAGE_REPLACED** @@ -125,85 +111,67 @@ Indicates that an installed application has been uninstalled from the device wit - Value: **usual.event.PACKAGE_REMOVED** - Required subscriber permissions: none - ## COMMON_EVENT_BUNDLE_REMOVED (Reserved, not supported yet) Indicates that an installed bundle has been uninstalled from the device with the application data retained. - Value: **usual.event.BUNDLE_REMOVED** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_FULLY_REMOVED (Reserved, not supported yet) Indicates that an installed application, including both the application data and code, has been completely uninstalled from the device. - Value: **usual.event.PACKAGE_FULLY_REMOVED** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_CHANGED Indicates that an application package has been changed (for example, an ability in the package has been enabled or disabled). - Value: **usual.event.PACKAGE_CHANGED** - Required subscriber permissions: none - -## COMMON_EVENT_PACKAGE_RESTARTED +## [COMMON_EVENT_PACKAGE_RESTARTED](./common_event/commonEvent-ability.md) Indicates that the user closed all processes of the application and restarted the application. -- Value: **usual.event.PACKAGE_RESTARTED** -- Required subscriber permissions: none - -## COMMON_EVENT_PACKAGE_DATA_CLEARED +## [COMMON_EVENT_PACKAGE_DATA_CLEARED](./common_event/commonEvent-ability.md) Indicates that the user cleared the application package data. -- Value: **usual.event.PACKAGE_DATA_CLEARED** -- Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_CACHE_CLEARED9+ Indicates that the user cleared the application package cache. - Value: **usual.event.PACKAGE_CACHE_CLEARED** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGES_SUSPENDED (Reserved, not supported yet) Indicates that application HAP files are suspended. - Value: **usual.event.PACKAGES_SUSPENDED** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGES_UNSUSPENDED (Reserved, not supported yet) Indicates that application HAP files are not suspended (restored from the suspended state). - Value: **usual.event.PACKAGES_UNSUSPENDED** - Required subscriber permissions: none - ## COMMON_EVENT_MY_PACKAGE_SUSPENDED Indicates that an application HAP file is suspended. - Value: **usual.event.MY_PACKAGE_SUSPENDED** - Required subscriber permissions: none - ## COMMON_EVENT_MY_PACKAGE_UNSUSPENDED Indicates that an application HAP file is not suspended. - Value: **usual.event.MY_PACKAGE_UNSUSPENDED** - Required subscriber permissions: none - ## COMMON_EVENT_UID_REMOVED (Reserved, not supported yet) Indicates that a user ID has been removed from the system. - Value: **usual.event.UID_REMOVED** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_FIRST_LAUNCH (Reserved, not supported yet) Indicates that an installed application is started for the first time. - Value: **usual.event.PACKAGE_FIRST_LAUNCH** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_NEEDS_VERIFICATION (Reserved, not supported yet) Indicates that an application requires system verification. - Value: **usual.event.PACKAGE_NEEDS_VERIFICATION** - Required subscriber permissions: none - ## COMMON_EVENT_PACKAGE_VERIFIED (Reserved, not supported yet) Indicates that an application has been verified by the system. - Value: **usual.event.PACKAGE_VERIFIED** @@ -215,91 +183,76 @@ Indicates that an application HAP file is not suspended. - Value: **usual.event.EXTERNAL_APPLICATIONS_AVAILABLE** - Required subscriber permissions: none - ## COMMON_EVENT_EXTERNAL_APPLICATIONS_UNAVAILABLE (Reserved, not supported yet) Indicates that applications installed on the external storage are not available for the system. - Value: **usual.event.EXTERNAL_APPLICATIONS_UNAVAILABLE** - Required subscriber permissions: none - ## COMMON_EVENT_CONFIGURATION_CHANGED (Reserved, not supported yet) Indicates that the device state (for example, orientation and locale) has changed. - Value: **usual.event.CONFIGURATION_CHANGED** - Required subscriber permissions: none - ## COMMON_EVENT_LOCALE_CHANGED (Reserved, not supported yet) Indicates that the device locale has changed. - Value: **usual.event.LOCALE_CHANGED** - Required subscriber permissions: none - ## COMMON_EVENT_MANAGE_PACKAGE_STORAGE (Reserved, not supported yet) Indicates that the device storage is insufficient. - Value: **usual.event.MANAGE_PACKAGE_STORAGE** - Required subscriber permissions: none - ## COMMON_EVENT_DRIVE_MODE (Reserved, not supported yet) Indicates that the system is in driving mode. - Value: **common.event.DRIVE_MODE** - Required subscriber permissions: none - ## COMMON_EVENT_HOME_MODE (Reserved, not supported yet) Indicates that the system is in home mode. - Value: **common.event.HOME_MODE** - Required subscriber permissions: none - ## COMMON_EVENT_OFFICE_MODE (Reserved, not supported yet) Indicates that the system is in office mode. - Value: **common.event.OFFICE_MODE** - Required subscriber permissions: none - ## COMMON_EVENT_USER_STARTED (Reserved, not supported yet) Indicates that the user has been started. - Value: **usual.event.USER_STARTED** - Required subscriber permissions: none - ## COMMON_EVENT_USER_BACKGROUND (Reserved, not supported yet) Indicates that the user has been brought to the background. - Value: **usual.event.USER_BACKGROUND** - Required subscriber permissions: none - ## COMMON_EVENT_USER_FOREGROUND (Reserved, not supported yet) Indicates that the user has been brought to the foreground. - Value: **usual.event.USER_FOREGROUND** - Required subscriber permissions: none - ## COMMON_EVENT_USER_SWITCHED Indicates that user switching is in progress. - Value: **usual.event.USER_SWITCHED** - Required subscriber permissions: ohos.permission.MANAGE_LOCAL_ACCOUNTS - ## COMMON_EVENT_USER_STARTING (Reserved, not supported yet) Indicates that the user is being started. - Value: **usual.event.USER_STARTING** - Required subscriber permissions: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - ## COMMON_EVENT_USER_UNLOCKED (Reserved, not supported yet) Indicates that the credential-encrypted storage has been unlocked for the current user after the device is restarted. - Value: **usual.event.USER_UNLOCKED** - Required subscriber permissions: none - ## COMMON_EVENT_USER_STOPPING (Reserved, not supported yet) Indicates that the user is going to be stopped. - Value: **usual.event.USER_STOPPING** - Required subscriber permissions: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - ## COMMON_EVENT_USER_STOPPED (Reserved, not supported yet) Indicates that the user has been stopped. - Value: **usual.event.USER_STOPPED** @@ -665,11 +618,15 @@ Indicates that the system charging type has changed. This event is available onl - Value: **usual.event.CHARGE_TYPE_CHANGED** - Required subscriber permissions: none -## COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED +## [COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED](./common_event/commonEvent-resourceschedule.md) (Reserved, not supported yet) Indicates that the system idle mode has changed. - Value: **usual.event.DEVICE_IDLE_MODE_CHANGED** - Required subscriber permissions: none +## [COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED10+](./common_event/commonEvent-resourceschedule.md) +Indicates that the exemption list for resource usage restrictions has been updated in idle mode. This event is for system applications only. +- Value: **usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED** +- Required subscriber permissions: none ## COMMON_EVENT_POWER_SAVE_MODE_CHANGED Indicates that the system power saving mode has changed. @@ -766,61 +723,51 @@ Indicates that a user has been removed from the system. - Value: **common.event.IVI_VOLTAGE_RECOVERY** - Required subscriber permissions: none - ## COMMON_EVENT_IVI_TEMPERATURE_RECOVERY (Reserved, not supported yet) Indicates that the temperature of the IVI system is restored to normal. - Value: **common.event.IVI_TEMPERATURE_RECOVERY** - Required subscriber permissions: none - ## COMMON_EVENT_IVI_ACTIVE (Reserved, not supported yet) Indicates that the battery service of the IVI system is active. - Value: **common.event.IVI_ACTIVE** - Required subscriber permissions: none - ## COMMON_EVENT_USB_STATE9+ Indicates that the USB device state has changed. -- Value: **usual.event.hardware.usb.action.USB_STATE** -- Required subscriber permissions: none +For details, see [Common Events of the USB Subsystem](common_event/commonEvent-usb.md). ## COMMON_EVENT_USB_PORT_CHANGED9+ Indicates that the USB port state of the device has changed. -- Value: **usual.event.hardware.usb.action.USB_PORT_CHANGED** -- Required subscriber permissions: none +For details, see [Common Events of the USB Subsystem](common_event/commonEvent-usb.md). ## COMMON_EVENT_USB_DEVICE_ATTACHED Indicates that a USB device has been attached to the device functioning as a USB host. -- Value: **usual.event.hardware.usb.action.USB_DEVICE_ATTACHED** -- Required subscriber permissions: none +For details, see [Common Events of the USB Subsystem](common_event/commonEvent-usb.md). ## COMMON_EVENT_USB_DEVICE_DETACHED Indicates that a USB device has been detached from the device functioning as a USB host. -- Value: **usual.event.hardware.usb.action.USB_DEVICE_DETACHED** -- Required subscriber permissions: none +For details, see [Common Events of the USB Subsystem](common_event/commonEvent-usb.md). ## COMMON_EVENT_USB_ACCESSORY_ATTACHED (Reserved, not supported yet) Indicates that a USB accessory was attached. -- Value: **usual.event.hardware.usb.action.USB_ACCESSORY_ATTACHED** -- Required subscriber permissions: none +For details, see [Common Events of the USB Subsystem](common_event/commonEvent-usb.md). ## COMMON_EVENT_USB_ACCESSORY_DETACHED (Reserved, not supported yet) Indicates that a USB accessory was detached. -- Value: **usual.event.data.DISK_MOUNTED** -- Required subscriber permissions: none +For details, see [Common Events of the USB Subsystem](common_event/commonEvent-usb.md). ## COMMON_EVENT_DISK_REMOVED (Reserved, not supported yet) Indicates that an external storage device was removed. - Value: **usual.event.data.DISK_BAD_REMOVAL** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_DISK_UNMOUNTED (Reserved, not supported yet) Indicates that an external storage device was unmounted. - Value: **usual.event.data.DISK_UNMOUNTABLE** @@ -838,92 +785,77 @@ Indicates that a USB device has been detached from the device functioning as a U - Value: usual.event.data.DISK_REMOVED - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_DISK_UNMOUNTABLE (Reserved, not supported yet) Indicates that an external storage device is unmountable when the card is inserted. - Value: **usual.event.data.DISK_UNMOUNTED** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_DISK_EJECT (Reserved, not supported yet) Indicates that an external storage device was ejected (at the software level). - Value: **usual.event.data.DISK_EJECT** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_VOLUME_REMOVED9+ Indicates that an external storage device was removed. - Value: **usual.event.data.VOLUME_REMOVED** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_VOLUME_UNMOUNTED9+ Indicates that an external storage device was unmounted. - Value: **usual.event.data.VOLUME_UNMOUNTED** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_VOLUME_MOUNTED9+ Indicates that an external storage device was mounted. - Value: **usual.event.data.VOLUME_MOUNTED** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_VOLUME_BAD_REMOVAL9+ Indicates that an external storage device was removed without being unmounted. - Value: **usual.event.data.VOLUME_BAD_REMOVAL** - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_VOLUME_EJECT9+ Indicates that an external storage device was ejected (at the software level). - Value: usual.event.data.VOLUME_EJECT - Required subscriber permissions: ohos.permission.STORAGE_MANAGER - ## COMMON_EVENT_VISIBLE_ACCOUNTS_UPDATED (Reserved, not supported yet) Indicates that the account visibility changed. - Value: **usual.event.data.VISIBLE_ACCOUNTS_UPDATED** - Required subscriber permissions: ohos.permission.GET_APP_ACCOUNTS - ## COMMON_EVENT_ACCOUNT_DELETED (Reserved, not supported yet) Indicates that an account was deleted. - Value: **usual.event.data.ACCOUNT_DELETED** - Required subscriber permissions: ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - ## COMMON_EVENT_FOUNDATION_READY (Reserved, not supported yet) Indicates that the foundation is ready. - Value: **usual.event.data.FOUNDATION_READY** - Required subscriber permissions: ohos.permission.RECEIVER_STARTUP_COMPLETED - ## COMMON_EVENT_AIRPLANE_MODE_CHANGED Indicates that the airplane mode of the device has changed. - Value: **usual.event.AIRPLANE_MODE** - Required subscriber permissions: none - ## COMMON_EVENT_SPLIT_SCREEN Indicates that the screen has been split. - Value: **usual.event.SPLIT_SCREEN** - Required subscriber permissions: ohos.permission.RECEIVER_SPLIT_SCREEN - ## COMMON_EVENT_SLOT_CHANGE9+ Indicates that the notification slot has been updated. - Value: **usual.event.SLOT_CHANGE** - Required subscriber permissions: ohos.permission.NOTIFICATION_CONTROLLER - ## COMMON_EVENT_SPN_INFO_CHANGED9+ Indicates that the SPN displayed has been updated. - Value: **usual.event.SPN_INFO_CHANGED** - Required subscriber permissions: none - -## COMMON_EVENT_QUICK_FIX_APPLY_RESULT9+ +## [COMMON_EVENT_QUICK_FIX_APPLY_RESULT9+](./common_event/commonEvent-ability.md) Indicates the result of applying a quick fix to the application. - Value: **usual.event.QUICK_FIX_APPLY_RESULT** - Required subscriber permissions: none @@ -1049,3 +981,6 @@ Indicates that the screen is unlocked. - Value: **usual.event.SCREEN_UNLOCKED** - Required subscriber permissions: none +## [COMMON_EVENT_QUICK_FIX_REVOKE_RESULT10+](./common_event/commonEvent-ability.md#common_event_quick_fix_revoke_result10) + +ָIndicates the result of revoking a quick fix to the application. \ No newline at end of file diff --git a/en/application-dev/reference/apis/common_event/Readme-EN.md b/en/application-dev/reference/apis/common_event/Readme-EN.md new file mode 100644 index 0000000000000000000000000000000000000000..9c61482c2e615aa50161c5482c8c46bb91027d1a --- /dev/null +++ b/en/application-dev/reference/apis/common_event/Readme-EN.md @@ -0,0 +1,8 @@ +# Common Events + +- [Common Events of the Ability Subsystem](commonEvent-ability.md) +- [Common Events of the Bundle Management Subsystem](commonEvent-bundleManager.md) +- [Common Events of the Notification Service](commonEvent-ans.md) +- [Common Events of the Resource Scheduling Subsystem](commonEvent-resourceschedule.md) +- [Common Events of the Telephony Subsystem](commonEvent-telephony.md) +- [Common Events of the USB Subsystem](commonEvent-usb.md) diff --git a/en/application-dev/reference/apis/common_event/commonEvent-ability.md b/en/application-dev/reference/apis/common_event/commonEvent-ability.md new file mode 100644 index 0000000000000000000000000000000000000000..e19380c4e089bcfe94eacdb0f04ad234e1d657f0 --- /dev/null +++ b/en/application-dev/reference/apis/common_event/commonEvent-ability.md @@ -0,0 +1,47 @@ +# Common Events of the Ability Subsystem +This document lists the common system events provided by the Ability subsystem to applications. + +## COMMON_EVENT_BOOT_COMPLETED + +Indicates that the user has finished the boot process. + +- Constant value: "usual.event.BOOT_COMPLETED" +- Required subscriber permissions: ohos.permission.RECEIVER_STARTUP_COMPLETED + +When the specified user finishes the boot process on the device, the event notification service is triggered to publish this event. + +## COMMON_EVENT_PACKAGE_RESTARTED + +Indicates that the user has restarted the application package and killed all its processes. + +- Constant value: "usual.event.PACKAGE_RESTARTED" +- Required subscriber permissions: none + +When the specified user restarts the application and kills all its processes, the event notification service is triggered to publish this event. + +## COMMON_EVENT_PACKAGE_DATA_CLEARED + +Indicates that the user cleared the application package data. + +- Constant value: "usual.event.PACKAGE_DATA_CLEARED" +- Required subscriber permissions: none + +When the specified user clears the application package data on the device, the event notification service is triggered to publish this event. + +## COMMON_EVENT_QUICK_FIX_APPLY_RESULT9+ + +Indicates the result of applying a quick fix to the application. + +- Constant value: "usual.event.QUICK_FIX_APPLY_RESULT" +- Required subscriber permissions: none + +When the specified user applies a quick fix to the application on the device, the event notification service is triggered to publish this event. + +## COMMON_EVENT_QUICK_FIX_REVOKE_RESULT10+ + +Indicates the result of revoking a quick fix to the application. + +- Constant value: "usual.event.QUICK_FIX_REVOKE_RESULT" +- Required subscriber permissions: none + +When a quick fix to the application is revoked on the device, the event notification service is triggered to publish this event. diff --git a/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md b/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md new file mode 100644 index 0000000000000000000000000000000000000000..41e7e2adae16d45e83fc527010939bdb5cfe119c --- /dev/null +++ b/en/application-dev/reference/apis/common_event/commonEvent-resourceschedule.md @@ -0,0 +1,24 @@ +# Common Events of the Resource Scheduling Subsystem +This document lists the common system events provided by the resource scheduling subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. + +## COMMON_EVENT_DEVICE_IDLE_MODE_CHANGED +Indicates that the system idle mode has changed. + +- Constant value: "usual.event.DEVICE_IDLE_MODE_CHANGED" +- Required subscriber permissions: none + +When the user does not use the device for the specified period of time and the screen is turned off, the system delays the CPU and network access by background applications, and the event notification service is triggered to publish this event. + +APIs related to this event: **deviceStandby**. + +## COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED +Indicates that the exemption list for resource usage restrictions has been updated in idle mode. + +- Constant value: "usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED" +- Required subscriber permissions: none + +When the exemption list for resource usage restrictions is updated, the event notification service is triggered to publish this event. +Resources include application network access, Timer usage, and WorkScheduler task usage. +System applications can call JavaScript APIs to apply for removing resource usage restrictions. + +APIs related to this event: **deviceStandby**. diff --git a/en/application-dev/reference/apis/common_event/commonEvent-usb.md b/en/application-dev/reference/apis/common_event/commonEvent-usb.md new file mode 100644 index 0000000000000000000000000000000000000000..4a42b32faee0ee46fe7c24f49db8c5c13a69cb54 --- /dev/null +++ b/en/application-dev/reference/apis/common_event/commonEvent-usb.md @@ -0,0 +1,57 @@ +# Common Events of the USB Subsystem +This document lists the common system events provided by the USB subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. + +## COMMON_EVENT_USB_STATE +Indicates that the USB device state has changed. + +- Constant value: "usual.event.hardware.usb.action.USB_STATE" +- Required subscriber permissions: none + +When a USB device is connected to or disconnected from the device, the event notification service is triggered to publish this event. + +## COMMON_EVENT_USB_PORT_CHANGED + +Indicates that the USB port state of the device has changed. + +- Constant value: "usual.event.hardware.usb.action.USB_PORT_CHANGED" +- Required subscriber permissions: none + +When the USB port status changes, the event notification service is triggered to publish this event. + +APIs related to this event: **dataRole** parameter in [setPortRoles](../js-apis-usbManager.md#usbsetportroles). + +## COMMON_EVENT_USB_DEVICE_ATTACHED + +Indicates that a USB device has been attached to the device functioning as a USB host. + +- Constant value: "usual.event.hardware.usb.action.USB_DEVICE_ATTACHED" +- Required subscriber permissions: none + +When a USB device is attached, the event notification service is triggered to publish this event. + +APIs related to this event: [USBDevice](../js-apis-usbManager.md#usbdevice). + +## COMMON_EVENT_USB_DEVICE_DETACHED + +Indicates that a USB device has been detached from the device functioning as a USB host. + +- Constant value: "usual.event.hardware.usb.action.USB_DEVICE_DETACHED" +- Required subscriber permissions: none + +When a USB device is deattached, the event notification service is triggered to publish this event. + +APIs related to this event: [USBDevice](../js-apis-usbManager.md#usbdevice). + +## COMMON_EVENT_USB_ACCESSORY_ATTACHED + +(Reserved, not supported yet) Indicates that a USB accessory was attached. + +- Constant value: "usual.event.hardware.usb.action.USB_ACCESSORY_ATTACHED" +- Required subscriber permissions: none + +## COMMON_EVENT_USB_ACCESSORY_DETACHED + +(Reserved, not supported yet) Indicates that a USB accessory was detached. + +- Constant value: "usual.event.data.DISK_MOUNTED" +- Required subscriber permissions: none diff --git a/en/device-dev/quick-start/quickstart-ide-env-ubuntu.md b/en/device-dev/quick-start/quickstart-ide-env-ubuntu.md index 7f2c7f416b0e3ec6b49af69ad002a1e8c6cff6a5..901f2ec199d7286a406b844854c5b4ee2c4c3eef 100644 --- a/en/device-dev/quick-start/quickstart-ide-env-ubuntu.md +++ b/en/device-dev/quick-start/quickstart-ide-env-ubuntu.md @@ -66,18 +66,3 @@ The following describes how to set up the Ubuntu environment. Wait until the "DevEco Device Tool successfully installed." message is displayed. ![en-us_image_0000001338201457](figures/en-us_image_0000001338201457.png) - - -6. Run the following **apt-get** command: - - ```shell - sudo apt-get update && sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib gcc-arm-linux-gnueabi libc6-dev-i386 libc6-dev-amd64 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev - ``` - - > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** - > - > The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, modify the preceding installation command based on the installation package name. - > - > - Python 3.8 or a later version is required. In this example, Python 3.8 is used. - > - > - Java 8 or later is required. In this example, Java 8 is used. diff --git a/en/device-dev/quick-start/quickstart-ide-import-project.md b/en/device-dev/quick-start/quickstart-ide-import-project.md index ea7bb12af5b9967b149d72cce3e01b51306be06e..dfb05bf61eb9119dc736fad19e4878c7f03054ef 100644 --- a/en/device-dev/quick-start/quickstart-ide-import-project.md +++ b/en/device-dev/quick-start/quickstart-ide-import-project.md @@ -24,8 +24,6 @@ A remote connection from the Windows environment to the Ubuntu environment has b ## Procedure -Source code from a mirror site can be of the OpenHarmony-v1.1.4-LTS, OpenHarmony-v3.0.3-LTS, or OpenHarmony-v3.1-Release version. - 1. Open DevEco Device Tool, go to the home page, and click **New Project**. ![en-us_image_0000001272258726](figures/en-us_image_0000001272258726.png)