Skip to content

Latest commit

 

History

History

remoteconfig

Remote Configuration quickstart

English | 中文

Contents

Introduction

AppGallery Connect Remote Configuration allows you to manage parameters online. With the service, you can change the behavior and appearance of your app online without requiring users to update the app. Remote Configuration provides cloud-based services, the console, and the client SDK. By integrating the client SDK, your app can periodically fetch parameter values delivered on the console to modify the app's behavior and appearance.

Environment Requirements

  • A computer with HUAWEI DevEco installed for app development
  • A device or emulator running HarmonyOS

Getting Started

Before running the Remote Configuration quickstart app you need to:

  1. If you do not have a Huawei developer account, register one and make it pass identity verification.
  2. Use your account to sign in to AppGallery Connect, create an app, and set Package type to APP (HarmonyOS app).
  3. Enable Remote Configuration. For details, please refer to the Remote Configuration development guide.
  4. Download the agconnect-services.json file from AppGallery Connect and copy it to the entry directory.

Sample Code

Call the fetch API to fetch values before every app launch. Use the fetched values after the call is successful. entry\src\main\java\com\huawei\quickstart\remoteconfig\slice\Test1Activity.java

The fetched values take effect next time the app is launched. entry\src\main\java\com\huawei\quickstart\remoteconfig\slice\Test2Activity.java

Technical Support

If you have any questions about the sample code, try the following:

  • Stack Overflow is a place for any programming questions. Be sure to tag your question with appgallery.
  • Huawei Developer Forum AppGallery Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

License

Remote Configuration quickstart is licensed under the Apache License, version 2.0.