Huawei Support

Support for Huawei devices

General Integration Documentation

Please refer to the general integration instructions given for Android. Added to this, please find the following instructions specifically for preparing your app for publishing at Huawei's AppGallery.

App preparation

Use Huawei as a platform

To use Huawei as a platform (instead of standard Android platform), set it in AATKitConfiguration before initializing AATKit like:

AATKitConfiguration config = new AATKitConfiguration(this);
//do some other configuration
config.setPlatform(AATKitConfiguration.Platform.HUAWEI);
AATKit.init(config);

Support for Huawei Advertising ID

AATKit (Android) supports two kinds of Advertising IDs for user reporting purposes:

  • the Google Advertising ID (GAID)

  • the Huawei Advertising ID (OAID)

If the GAID is available at runtime, AATKit will always use it for reporting (even if the device also supports the OAID). Only if the GAID is not available, AATKit will try to read Huawei Advertising ID (OAID) and use that one instead for reporting.

For Huawei devices not supporting Google Play Services, AATKit can now read the advertising ID provided by Huawei Mobile Services and use it for reporting. To enable this feature, you need to:

  • add the maven { url 'https://developer.huawei.com/repo/' } repository to your repositories list by editing your main build.gradle file

  • add the implementation 'com.huawei.hms:ads-identifier:<HUAWEI_VERSION>' dependency

Please note that Google Play Services library is still required when compiling the app.

Ad networks

AATKit will dynamically disable ad networks at runtime that do not work without Google Play Services. This means that you can put any AATKit ad network into your project without bothering about different use cases (devices with or without Google Play Services).

Optional Huawei Ad Network

AATKit also supports Huawei as an ad network. See here to learn how to add it.

Last updated