1# System Common Events (System API) 2 3This document provides a list of common events defined by the system. 4 5Common event types are defined in [Support enumeration of the ohos.commonEventManager module](../js-apis-commonEventManager.md#support). 6 7> **NOTE** 8> 9> The current page contains only the system APIs of this module. For details about other public APIs, see [System Common Events](../common_event/commonEventManager-definitions.md). 10 11 12 13 14## Ability Kit 15 16 17### COMMON_EVENT_BOOT_COMPLETED 18 19Indicates that the boot is complete and the system is loaded. 20 21When the specified user finishes the boot process on the device, the event notification service is triggered to publish this event. 22 23**System API**: This is a system API. 24 25**System capability**: SystemCapability.Notification.CommonEvent 26 27**Required subscriber permissions**: ohos.permission.RECEIVER_STARTUP_COMPLETED (for system applications only) 28 29**Value**: "usual.event.BOOT_COMPLETED" 30 31### COMMON_EVENT_PACKAGE_INSTALLATION_STARTED<sup>12+</sup> 32 33Indicates that a package is sent by the system verifier when the package is verified. 34 35When a new application starts to be installed by a specified user on the device, the event notification service is triggered to publish this event. 36 37**System API**: This is a system API. 38 39**System capability**: SystemCapability.Notification.CommonEvent 40 41**Required subscriber permissions**: none 42 43**Value**: "usual.event.PACKAGE_INSTALLATION_STARTED" 44 45 46 47## Background Tasks Kit 48 49### COMMON_EVENT_DEVICE_IDLE_EXEMPTION_LIST_UPDATED<sup>10+</sup> 50 51Indicates that the exemption list for resource usage restrictions has been updated in idle mode. 52 53When the exemption list for resource usage restrictions is updated, the event notification service is triggered to publish this event. 54Resources include application network access, Timer usage, and WorkScheduler task usage. 55 56System applications can call JavaScript APIs to apply for removing resource usage restrictions. 57 58**System API**: This is a system API. 59 60**System capability**: SystemCapability.Notification.CommonEvent 61 62**Required subscriber permissions**: none 63 64**Value**: "usual.event.DEVICE_IDLE_EXEMPTION_LIST_UPDATED" 65 66 67 68 69## Basic Services Kit - Power Supply 70 71### COMMON_EVENT_CHARGE_TYPE_CHANGED<sup>10+</sup> 72 73Indicates that the system charging type has changed. 74 75When the system charging type changes, the event notification service is triggered to publish this event. 76 77**System API**: This is a system API. 78 79**System capability**: SystemCapability.Notification.CommonEvent 80 81**Required subscriber permissions**: none 82 83**Value**: "usual.event.CHARGE_TYPE_CHANGED" 84 85 86### COMMON_EVENT_USER_ADDED 87 88Indicates that a user has been added to the system. 89 90When a system account is created, the event notification service is triggered to publish this event carrying the system account ID. 91 92APIs related to this event: **createOsAccount** and **createOsAccountForDomain**. These APIs are system APIs. For details, see [@ohos.account.osAccount (System Account Management)](../js-apis-osAccount.md). 93 94**System API**: This is a system API. 95 96**System capability**: SystemCapability.Notification.CommonEvent 97 98**Required subscriber permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (for system applications only) 99 100**Value**: "usual.event.USER_ADDED" 101 102 103### COMMON_EVENT_USER_REMOVED 104 105Indicates that a user has been removed from the system. 106 107When a system account is removed, the event notification service is triggered to publish this event carrying the system account ID. 108 109APIs related to this event: **removeOsAccount**. This API is a system API. For details, see [@ohos.account.osAccount (System Account Management)](../js-apis-osAccount.md). 110 111**System API**: This is a system API. 112 113**System capability**: SystemCapability.Notification.CommonEvent 114 115**Required subscriber permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (for system applications only) 116 117**Value**: "usual.event.USER_REMOVED" 118 119 120### COMMON_EVENT_DOMAIN_ACCOUNT_STATUS_CHANGED 121 122Indicates that the status of the domain account status changes. 123 124When a domain user account is authenticated, deleted, or has the token updated, the event notification service is triggered to publish this event carrying the system account ID, domain name, and account status. 125 126APIs related to this event: **removeOsAccount**, **DomainAccountManager.auth**, and **updateAccountToken**. These APIs are system APIs. For details, see [@ohos.account.osAccount (System Account Management)](../js-apis-osAccount.md). 127 128**System API**: This is a system API. 129 130**System capability**: SystemCapability.Notification.CommonEvent 131 132**Required subscriber permissions**: ohos.permission.GET_LOCAL_ACCOUNTS (for system applications only) 133 134**Value**: "usual.event.DOMAIN_ACCOUNT_STATUS_CHANGED" 135 136 137### COMMON_EVENT_USER_SWITCHED 138 139Indicates that a user switchover is complete. 140 141When a system account is switched, the event notification service is triggered to publish this event carrying the system account ID. 142 143APIs related to this event: **activateOsAccount**. This API is a system API. For details, see [@ohos.account.osAccount (System Account Management)](../js-apis-osAccount.md). 144 145**System API**: This is a system API. 146 147**System capability**: SystemCapability.Notification.CommonEvent 148 149**Required subscriber permissions**: ohos.permission.MANAGE_LOCAL_ACCOUNTS (for system applications only) 150 151**Value**: "usual.event.USER_SWITCHED" 152 153 154 155 156## Core File Kit 157 158This document lists the common system events provided by the file management subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events. 159 160 161### COMMON_EVENT_VOLUME_REMOVED 162 163Indicates that an external storage device was removed. 164 165This common event is triggered when an external storage device is removed. 166 167**System API**: This is a system API. 168 169**System capability**: SystemCapability.Notification.CommonEvent 170 171**Required subscriber permissions**: ohos.permission.STORAGE_MANAGER 172 173**Value**: "usual.event.data.VOLUME_REMOVED" 174 175### COMMON_EVENT_VOLUME_UNMOUNTED 176 177Indicates that an external storage device was unmounted. 178 179This common event is triggered when an external storage device is successfully unmounted by calling the **unmount** API or by removing the device. 180 181**System API**: This is a system API. 182 183**System capability**: SystemCapability.Notification.CommonEvent 184 185**Required subscriber permissions**: ohos.permission.STORAGE_MANAGER 186 187**Value**: "usual.event.data.VOLUME_UNMOUNTED" 188 189 190### COMMON_EVENT_VOLUME_MOUNTED 191 192Indicates that an external storage device was mounted. 193 194This common event is triggered when an external storage device is successfully mounted by calling the **mount** API or by inserting the device. 195 196**System API**: This is a system API. 197 198**System capability**: SystemCapability.Notification.CommonEvent 199 200**Required subscriber permissions**: ohos.permission.STORAGE_MANAGER 201 202**Value**: "usual.event.data.VOLUME_MOUNTED" 203 204 205### COMMON_EVENT_VOLUME_BAD_REMOVAL 206 207Indicates that an external storage device was removed without being unmounted. 208 209This common event is triggered when an external storage device is directly removed without being unmounted. 210 211**System API**: This is a system API. 212 213**System capability**: SystemCapability.Notification.CommonEvent 214 215**Required subscriber permissions**: ohos.permission.STORAGE_MANAGER 216 217**Value**: "usual.event.data.VOLUME_BAD_REMOVAL" 218 219 220### COMMON_EVENT_VOLUME_EJECT 221 222Indicates that an external storage device is about to be ejected. 223 224This common event is triggered when the user calls the **unmount** API on a mounted external storage device or removes the device. 225 226**System API**: This is a system API. 227 228**System capability**: SystemCapability.Notification.CommonEvent 229 230**Required subscriber permissions**: ohos.permission.STORAGE_MANAGER 231 232**Value**: "usual.event.data.VOLUME_EJECT" 233 234 235### COMMON_EVENT_RESTORE_START<sup>13+</sup> 236 237Indicates the common event that an application starts to be restored. 238 239When a data migration application starts the backup and restore framework to perform a restoration task, the event notification service is triggered to publish this event. 240 241**System API**: This is a system API. 242 243**System capability**: SystemCapability.Notification.CommonEvent 244 245**Required subscriber permissions**: ohos.permission.START_RESTORE_NOTIFICATION 246 247**Value**: "usual.event.RESTORE_START" 248 249 250 251 252## Telephony Kit 253 254### COMMON_EVENT_SMS_RECEIVE_COMPLETED<sup>10+</sup> 255 256Indicates that an SMS message is received. 257 258When the device receives an SMS message, the event notification service is triggered to publish this event. 259 260**System API**: This is a system API. 261 262**System capability**: SystemCapability.Notification.CommonEvent 263 264**Required subscriber permissions**: ohos.permission.RECEIVE_SMS (for system apps only) 265 266**Value**: usual.event.SMS_RECEIVED_COMPLETED 267 268 269### COMMON_EVENT_SMS_EMERGENCY_CB_RECEIVE_COMPLETED<sup>10+</sup> 270 271Indicates that an emergency cell broadcast message is received. 272 273When the device receives an emergency cell broadcast message, the event notification service is triggered to publish this event. 274 275**System API**: This is a system API. 276 277**System capability**: SystemCapability.Notification.CommonEvent 278 279**Required subscriber permissions**: ohos.permission.RECEIVE_SMS (for system apps only) 280 281**Value**: usual.event.SMS_EMERGENCY_CB_RECEIVE_COMPLETED 282 283 284### COMMON_EVENT_SMS_CB_RECEIVE_COMPLETED<sup>10+</sup> 285 286Indicates that a cell broadcast message is received. 287 288When the device receives a cell broadcast message, the event notification service is triggered to publish this event. 289 290**System API**: This is a system API. 291 292**System capability**: SystemCapability.Notification.CommonEvent 293 294**Required subscriber permissions**: ohos.permission.RECEIVE_SMS (for system apps only) 295 296**Value**: usual.event.SMS_CB_RECEIVE_COMPLETED 297 298### COMMON_EVENT_OPERATOR_CONFIG_CHANGED<sup>10+</sup> 299 300Indicates that the carrier configuration has been updated. 301 302When the carrier configuration of the device is updated, the event notification service is triggered to publish this event. 303 304**System API**: This is a system API. 305 306**System capability**: SystemCapability.Notification.CommonEvent 307 308**Required subscriber permissions**: none 309 310**Value**: usual.event.OPERATOR_CONFIG_CHANGED 311 312 313### COMMON_EVENT_SIM_CARD_DEFAULT_SMS_SUBSCRIPTION_CHANGED<sup>10+</sup> 314 315Indicates that the default primary SIM card for the SMS service has been updated. 316 317When the default primary SIM card for the SMS service is updated, the event notification service is triggered to publish this event. 318 319**System API**: This is a system API. 320 321**System capability**: SystemCapability.Notification.CommonEvent 322 323**Required subscriber permissions**: none 324 325**Value**: usual.event.DEFAULT_SMS_SUBSCRIPTION_CHANGED 326 327 328### COMMON_EVENT_SIM_CARD_DEFAULT_DATA_SUBSCRIPTION_CHANGED<sup>10+</sup> 329 330Indicates that the default primary SIM card for the data service has been updated. 331 332When the default primary SIM card for the data service is updated, the event notification service is triggered to publish this event. 333 334**System API**: This is a system API. 335 336**System capability**: SystemCapability.Notification.CommonEvent 337 338**Required subscriber permissions**: none 339 340**Value**: usual.event.DEFAULT_DATA_SUBSCRIPTION_CHANGED 341 342 343### COMMON_EVENT_SIM_CARD_DEFAULT_MAIN_SUBSCRIPTION_CHANGED<sup>10+</sup> 344 345Indicates that the default primary SIM card of the device has been updated. 346 347When the default primary SIM card of the device is updated, the event notification service is triggered to publish this event. 348 349**System API**: This is a system API. 350 351**System capability**: SystemCapability.Notification.CommonEvent 352 353**Required subscriber permissions**: none 354 355**Value**: usual.event.SIM.DEFAULT_MAIN_SUBSCRIPTION_CHANGED 356 357 358### COMMON_EVENT_SET_PRIMARY_SLOT_STATUS<sup>11+</sup> 359 360Indicates that the status of the action for setting the primary SIM card changes. 361 362When the status of the action for setting the primary SIM card changes (for example, when the status is updated to executing or completed), the event notification service is triggered to publish this event. 363 364**System API**: This is a system API. 365 366**System capability**: SystemCapability.Notification.CommonEvent 367 368**Required subscriber permissions**: none 369 370**Value**: usual.event.SET_PRIMARY_SLOT_STATUS 371 372 373### COMMON_EVENT_PRIMARY_SLOT_ROAMING<sup>11+</sup> 374 375Indicates that the roaming status of the default primary SIM card is updated. 376 377When the roaming status of the default primary SIM card changes, the event notification service is triggered to publish this event. 378 379**System API**: This is a system API. 380 381**System capability**: SystemCapability.Notification.CommonEvent 382 383**Required subscriber permissions**: none 384 385**Value**: usual.event.PRIMARY_SLOT_ROAMING 386 387 388### COMMON_EVENT_SIM_CARD_DEFAULT_VOICE_SUBSCRIPTION_CHANGED<sup>10+</sup> 389 390Indicates that the default primary SIM card for the voice service has been updated. 391 392When the default primary SIM card for the voice service is updated, the event notification service is triggered to publish this event. 393 394**System API**: This is a system API. 395 396**System capability**: SystemCapability.Notification.CommonEvent 397 398**Required subscriber permissions**: none 399 400**Value**: usual.event.DEFAULT_VOICE_SUBSCRIPTION_CHANGED 401 402 403### COMMON_EVENT_CELLULAR_DATA_STATE_CHANGED<sup>10+</sup> 404 405Indicates that the cellular data status has been updated. 406 407When the cellular data status of the device is updated, the event notification service is triggered to publish this event. 408 409**System API**: This is a system API. 410 411**System capability**: SystemCapability.Notification.CommonEvent 412 413**Required subscriber permissions**: none 414 415**Value**: usual.event.CELLULAR_DATA_STATE_CHANGED 416 417 418### COMMON_EVENT_INCOMING_CALL_MISSED<sup>10+</sup> 419 420Indicates that an incoming call is missed. 421 422When an incoming call is missed on the device, the event notification service is triggered to publish this event. 423 424**System API**: This is a system API. 425 426**System capability**: SystemCapability.Notification.CommonEvent 427 428**Required subscriber permissions**: ohos.permission.GET_TELEPHONY_STATE (for system apps only) 429 430**Value**: usual.event.INCOMING_CALL_MISSED 431 432 433### COMMON_EVENT_RADIO_STATE_CHANGE<sup>10+</sup> 434 435Indicates that the radio status of the device has changed. 436 437When there is a change in the radio status of the device, the event notification service is triggered to publish this event. 438 439**System API**: This is a system API. 440 441**System capability**: SystemCapability.Notification.CommonEvent 442 443**Required subscriber permissions**: none 444 445**Value**: usual.event.RADIO_STATE_CHANGE 446 447 448### COMMON_EVENT_SPECIAL_CODE<sup>10+</sup> 449 450Indicates that a secret code is sent successfully. 451 452When a secret code is successfully sent on the device, the event notification service is triggered to publish this event. 453 454**System API**: This is a system API. 455 456**System capability**: SystemCapability.Notification.CommonEvent 457 458**Required subscriber permissions**: none 459 460**Value**: usual.event.DIALER_SPECIAL_CODE 461 462 463### COMMON_EVENT_AUDIO_QUALITY_CHANGE<sup>10+</sup> 464 465Indicates that the audio quality has changed. 466 467When there is a change in the audio quality of the device, the event notification service is triggered to publish this event. 468 469**System API**: This is a system API. 470 471**System capability**: SystemCapability.Notification.CommonEvent 472 473**Required subscriber permissions**: none 474 475**Value**: usual.event.AUDIO_QUALITY_CHANGE 476 477 478## Reserved Common Event 479 480Below are reserved common events that are not supported yet. 481 482### COMMON_EVENT_STK_COMMAND<sup>10+</sup> 483 484(Reserved, not supported yet) Indicates that an STK command is sent. 485 486When an STK command is sent, the event notification service is triggered to publish this event. 487 488**System API**: This is a system API. 489 490**System capability**: SystemCapability.Notification.CommonEvent 491 492**Required subscriber permissions**: none 493 494**Value**: usual.event.STK_COMMAND 495 496 497### COMMON_EVENT_STK_SESSION_END<sup>10+</sup> 498 499(Reserved, not supported yet) Indicates that an STK session has ended. 500 501When an STK session ends, the event notification service is triggered to publish this event. 502 503**System API**: This is a system API. 504 505**System capability**: SystemCapability.Notification.CommonEvent 506 507**Required subscriber permissions**: none 508 509**Value**: usual.event.STK_SESSION_END 510 511 512### COMMON_EVENT_STK_CARD_STATE_CHANGED<sup>10+</sup> 513 514(Reserved, not supported yet) Indicates that the STK card status has been updated. 515 516When the STK card status is updated, the event notification service is triggered to publish this event. 517 518**System API**: This is a system API. 519 520**System capability**: SystemCapability.Notification.CommonEvent 521 522**Required subscriber permissions**: none 523 524 525**Value**: usual.event.STK_CARD_STATE_CHANGED 526 527### COMMON_EVENT_STK_ALPHA_IDENTIFIER<sup>10+</sup> 528 529(Reserved, not supported yet) Indicates that an STK Alpha identifier is sent. 530 531When an STK Alpha identifier is sent, the event notification service is triggered to publish this event. 532 533**System API**: This is a system API. 534 535**System capability**: SystemCapability.Notification.CommonEvent 536 537**Required subscriber permissions**: none 538 539**Value**: usual.event.STK_ALPHA_IDENTIFIER 540 541 542### COMMON_EVENT_SMS_WAPPUSH_RECEIVE_COMPLETED<sup>10+</sup> 543 544(Reserved, not supported yet) Indicates that a WAP push message is received. 545 546When the device receives a WAP push message, the event notification service is triggered to publish this event. 547 548**System API**: This is a system API. 549 550**System capability**: SystemCapability.Notification.CommonEvent 551 552**Required subscriber permissions**: ohos.permission.RECEIVE_SMS (for system apps only) 553 554**Value**: usual.event.SMS_WAPPUSH_RECEIVE_COMPLETED 555