目录

Mobile SDK

The SDK needs to be loaded to your app when you package the app. The SDK starts to run in the app process when a user launches the app and is stopped immediately after the user closes the app.

SDK Permissions

Appropriate permissions are required to call different capabilities.

API

Permission Name

Permission Request

getBehavior

Behavior detection

  • Android 10 (API level 29) and later versions: android.permission.ACTIVITY_RECOGNITION

  • Android 9 (API level 28): com.huawei.hms.permission.ACTIVITY_RECOGNITION

getBeaconStatus

Bluetooth

android.permission.BLUETOOTH

Location

android.permission.ACCESS_FINE_LOCATION

getHeadsetStatus

Bluetooth

android.permission.BLUETOOTH

getLocation/getCurrentLocation

Location

android.permission.ACCESS_FINE_LOCATION

getWeatherByDevice/getWeatherByUserLocation
  • Obtaining the user location based on GPS android.permission.ACCESS_FINE_LOCATION

  • Obtaining the user location based on the device IP address: android.permission.ACCESS_COARSE_LOCATION

getTimeCategories

Location

  • Obtaining the user location based on GPS android.permission.ACCESS_FINE_LOCATION

  • Obtaining the user location based on the device IP address: android.permission.ACCESS_COARSE_LOCATION

getBluetoothStatus

Bluetooth

android.permission.BLUETOOTH

API

Permission Name

Permission Request

BehaviorBarrier

Behavior detection

  • Android 10 (API level 29) and later versions: android.permission.ACTIVITY_RECOGNITION

  • Android 9 (API level 28): com.huawei.hms.permission.ACTIVITY_RECOGNITION

BeaconBarrier

Bluetooth

android.permission.BLUETOOTH

Locationandroid.permission.ACCESS_FINE_LOCATION

HeadsetBarrier

Bluetooth

android.permission.BLUETOOTH

LocationBarrier

Location

  • android.permission.ACCESS_FINE_LOCATION

  • Android 10 and later versions: android.permission.ACCESS_BACKGROUND_LOCATION

TimeBarrier

Location

android.permission.ACCESS_FINE_LOCATION

BluetoothBarrier

Bluetooth

android.permission.BLUETOOTH

To call the beacon capability, ensure that the permission requirements of HUAWEI Nearby Service are met. For details, please refer to  Adding Permissions.

SDK Data Collection 

The HMS Core Awareness SDK does not store any personal data or disclose personal data to any third parties. The HMS Core Awareness SDK provides only capability APIs. The service capabilities can be called on demand through the APIs.

SDK Data Security Protection

The HMS Core Awareness SDK and on-device service exchange data with each other using Binder. The security mechanism of Android ensures secure data transmission based on Binder.