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