Intermediate: How to fetch Remote Configuration from Huawei AGC in Unity
Huawei provides Remote Configuration service to manage parameters online, with this service you can control or change the behavior and appearance of you app online without requiring user’s interaction or update to app. By implementing the SDK you can fetch the online parameter values delivered on the AG-console to change the app behavior and appearance.
Introduction
Huawei provides Remote Configuration service to manage parameters online, with this service you can control or change the behavior and appearance of you app online without requiring user’s interaction or update to app. By implementing the SDK you can fetch the online parameter values delivered on the AG-console to change the app behavior and appearance.
Functional features
1. Parameter management: This function enables user to add new parameter, delete, update existing parameter and setting conditional values.
2. Condition management: This function enables user to adding, deleting and modifying conditions and copy and modify existing conditions. Currently, you can set the following conditions version, country/region, audience, user attribute, user percentage, time and language. You can expect more conditions in the future.
3. Version management: This feature function supports user to manage and rollback up to 90 days of 300 historical versions for parameters and conditions.
4. Permission management: This feature function allows account holder, app administrator, R&D personnel, and administrator and operations personals to access Remote Configuration by default.
Service use cases
- Change app language by Country/Region

- Show Different Content to Different Users

- Change the App Theme by Time

Development Overview
You need to install Unity software and I assume that you have prior knowledge about the unity and C#.
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.
- Unity software installed.
- Visual Studio/Code installed.
- HMS Core (APK) 4.X or later.
Integration Preparations
1. Create a project in AppGallery Connect.
2. Create Unity project.

3. Huawei HMS AGC Services to project.

4. Download and save the configuration file.

Add the agconnect-services.json file following directory Assests > Plugins > Android

5. Add the following plugin and dependencies in LaucherTemplate.
6. Add the following dependencies in MainTemplate.
7. Add dependencies in build script repositories and all project repositories & class path in BaseProjectTemplate.
8. Configuring project in AGC
9. Create Empty Game object rename to RemoteConfigManager, UI canvas texts and button and assign onclick events to respective text and button as shown below.


10. Click to Build apk, choose File > Build settings > Build, to Build and Run, choose File > Build settings > Build And Run

Result




Tips and Tricks
- Add agconnect-services.json file without fail.
- Make sure dependencies added in build files.
- Make sure that you released once parameters added/updated.
Conclusion
We have learnt integration of Huawei Remote Configuration Service into Unity Game development. Remote Configuration service lets you to fetch configuration data from local xml file and online i.e. AG-Console, changes will reflect immediately once you releases the changes. Conclusion is service lets you to change your app behavior and appearance without app update or user interaction.
Thank you so much for reading article, hope this article helps you.
Reference