To help you use HUAWEI Awareness Kit properly and avoid misunderstanding, you are advised to follow the instructions below:
Prior user consent
Your app should clearly explain the effect of using awareness capabilities to the user. For example, if your app has been set to suggest a playlist when the user plugs in a headset and starts jogging in the morning, you need to explain this effect to the user. If this effect is not explained to users who do not expect it, user experience may deteriorate.
Proper service usage
To reduce the battery consumption caused by calling HUAWEI Awareness Kit, do not initiate too many capture requests and register too many barriers. Otherwise, the service will restrict the returned information. The total number of API calls every 5 seconds cannot exceed 20, and the total number of API calls every hour cannot exceed 1000. The total number of barriers registered (including those deleted after registration) within 5s cannot exceed 500.
A maximum of 200 barriers can be registered for each CP ID. If a combination barrier containsnatomic barriers, all atomic barriers and the combination barrier itself are counted. That is, the number of barriers of the combination barrier isn+ 1.
Option to disable a beacon barrier
After your app registers with a beacon barrier, the device uses the Bluetooth function to continuously scan nearby beacon devices, which consumes extra power. Your app needs to notify the user of the situation and provides an API for the user to disable the beacon barrier. Beacon barriers can be registered or deleted no matter whether Bluetooth is enabled or not, but beacon capabilities are available only when Bluetooth is enabled.
Bluetooth car stereo type
To use a Bluetooth car kit API, you must pass a parameter to specify the Bluetooth car stereo type.
Capability of querying the supported awareness capabilities
Before using HUAWEI Awareness Kit, you are advised to call the querySupportingCapabilities API to query the supported awareness capabilities.