harmony 鸿蒙CommonEventSubscribeInfo

  • 2023-06-24
  • 浏览 (579)

CommonEventSubscribeInfo

The CommonEventSubscribeInfo module provides APIs for providing subscriber information.

NOTE

The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Attributes

System capability: SystemCapability.Notification.CommonEvent

Name Type Readable Writable Description
events Array<string> Yes No Common events to subscribe to.
publisherPermission string Yes No Permission of the publisher. The subscriber can receive only the events from the publisher with this permission.
publisherDeviceId string Yes No Device ID. The value must be the ID of a device on the same network.
userId number Yes No User ID. If this parameter is not specified, the default value, which is the ID of the current user, will be used. The value must be an existing user ID in the system.
priority number Yes No Subscriber priority. The value ranges from –100 to +1000. If the value exceeds the upper or lower limit, the upper or lower limit is used.
publisherBundleName string Yes No Bundle name of the publisher to subscribe to.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

0  赞