目录

HUAWEI Push Kit open capability set, which provides public classes and methods for obtaining the application anonymous device identifier (AAID) of apps and obtaining tokens required for accessing HUAWEI Push Kit.
An AAID identifies an app instance running on an intelligent mobile device. Only the app instance identified by the AAID can access the AAID. The AAID is involved only in app installation. Compared with the device-level hardware ID that cannot be reset, the AAID features higher privacy.

To be specific, the AAID has the following features:

  1. Anonymous, no privacy risk: An AAID is not associated with any existing identifiers. Besides, each app can only access its own AAID.
  2. For different apps from the same developer, which are running on the same device, each of them has its own AAID.
  3. For different apps from different developers, which are running on the same device, each of them has its own AAID.
  4. For apps from the same developer, which are running on different devices, each of them has its own AAID.
  5. For different apps from different developers, which are running on different devices, each of them has its own AAID.

Scenarios where the AAID may change include but are not limited to the following:

  1. An app is uninstalled and installed again.
  2. An app calls the method for deleting the AAID.
  3. A user restores the device to its factory settings.
  4. App data is deleted.

Classes

Class nameClass description
HmsInstanceIdProvides methods for obtaining the AAID of an app and obtaining tokens required for accessing HUAWEI Push Kit.

Exceptions

namedescription
ApiExceptionException returned when a public method in the HMS SDK fails to be called. For details about result codes, please refer to the ErrorEnum class.