Hey! These docs are for version 7.0, which is no longer officially supported. Click here for the latest version, 9.0!


# Step 1. Flutter OneSignal SDK Setup

Follow the [Flutter SDK Setup](🔗) instructions.

# Step 2. Huawei Setup

  • **2.1** Configure App Information in AppGallery Connect See Huawei's [Configure App Information in AppGallery Connect](🔗)

  • **2.2** Add dependencies to Flutter android project Under project build.gradle add the following

Huawei Flutter Plugin

If using Flutter Huawei Plugin Skip to step 3


  • Under app build.gradle add the following



# Step 3. Flutter Huawei Plugin setup (Optional)

OneSignal does not require the Flutter Huawei plugin and in most cases you can omit this. However, if you need specific Huawei features in Flutter see [Integrating Flutter HMS Push Kit Module](🔗)

  • **3.1** When following the plugin setup, after downloading the plugin remove the FlutterHMSMessageService from the downloaded plugin's `AndroidManifest.xml` file under the android package.

1450


# Step 4. Huawei Location Service (Optional)

  • **4.1** Add `implementation 'com.huawei.hms:location:<HUAWEI HMS VERSION #>` to your app build.gradle's dependencies section.

  • **4.2** Make sure to also add the location permission to your AndroidManifest.xml if you don't have this already



## Notes/Resources

#### [Huawei Flutter Sample](🔗)

This is an example Flutter project integrating the Huawei Flutter Plugin.

#### [Huawei Error Codes](🔗)

  • HMS error code reference to help debug logs and successfully integrate HMS Core SDK with the OneSignal SDK.

#### Keystore Signature

  • **[Huawei Signing Certificate Usage](🔗)**

    • You may need to create a debug or release keystore signature (choose the correct app build path, `debug` or `release`) so that a `6003` error is avoided when registering for Huawei `pushToken` with the OneSignal SDK.