Integrating Huawei Account, Banner and Splash Ads in Flutter StoryApp

Shiddalingeshwar M S
3 min readFeb 25, 2022

Introduction

In this article, we will be integrating Huawei Account, Banner and Splash Ads kit in Flutter StoryApp. Flutter plugin provides simple and convenient way to experience authorization of users. Flutter Account Plugin allows users to connect to the Huawei ecosystem using their Huawei IDs from the different devices such as mobiles phones and tablets, added users can login quickly and conveniently sign in to apps with their Huawei IDs after granting initial access permission.

Huawei Ads kit provides access to range of development capabilities. You can promote your apps quickly and more efficiently to Huawei’s vast users. Ads kit helps your app to monetize quickly and start generating revenue.

Huawei supports following Ads

  • Banner
  • Interstitial
  • Native
  • Reward
  • Splash
  • Instream(Roll)

Development Overview

You need to install Flutter and Dart plugin in IDE and I assume that you have prior knowledge about the Flutter and Dart.

Hardware Requirements

  • A computer (desktop or laptop) running Windows 10.
  • A Huawei phone (with the USB cable), which is used for debugging.

Software Requirements

  • Java JDK 1.7 or later.
  • Android studio software or Visual Studio or Code installed.
  • HMS Core (APK) 4.X or later.

Integration process

Step 1: Create Flutter project.

Select flutter and sdk path
Adding project details

Step 2: Add the App level gradle dependencies.

Choose inside project Android > app > build.gradle.

Root level gradle dependencies

Step 3: Add the below permissions in Android Manifest file.

Step 4: Download flutter plugins

Step 5: Add downloaded file into parent directory of the project. Declare plugin path in pubspec.yaml file under dependencies.

Add path location for asset image.

Add images path in pubspec.yaml file
Add respective dependency plugin path in pubspec.yaml file

Let’s start coding

Login screen code
You will see list of stories in this code
Story details and banner ad you can see here

Result

StoryApp result you can see here

Tricks and Tips

  • Make sure that downloaded plugin is unzipped in parent directory of project.
  • Makes sure that agconnect-services.json file added.
  • Make sure dependencies are added yaml file.
  • Run flutter pug get after adding dependencies.
  • Make sure that service is enabled in agc.
  • Makes sure images are defined in yaml file.

Conclusion

we have learnt how to integrate Huawei Account kit and Huawei Banner and Splash Ads in Flutter StoryApp. Once Account kit integrated, users can login quickly and conveniently sign in to apps with their Huawei IDs after granting initial access permission. Banner and Splash Ads helps you to monetize your StoryApp.

Thank you so much for reading, and also I would like to ‘thanks author for write-ups’. I hope this article helps you to understand the integration of Huawei Account kit, Huawei Banner and Splash Ads in flutter StoryApp.

Reference

Ads Kit

StoryAuthors

Ads Kit — Training Video

Account Kit — Training Video

Checkout in forum

--

--