Demo Acquisition
TCMPP Demo contains exemplary code integrated with the mini-program container, providing a convenient reference for developers (Demo Acquisition Link). Instructions for Use
Host Application Configuration Replacement
TCMPP Demo's built-in configuration file is bound to the official test account's application. Prior to previewing the mini-program under your personal application, make sure to complete the following steps to replace the configuration:
1. Log into the Tencent Cloud Mini-Program Platform - Operational End, download the host application configuration file, and use it to replace the tcmpp-android-configurations.json file located in the app/main/assets path of the Demo project.
2. Change the Demo project's package name to match the console application configuration. If the package names are inconsistent, validation will fail during execution.
Upon completion of the aforementioned steps, the Demo will be properly bound to the application under your console. You can now scan code to try the mini-program associated with this application.
Replace Built-in Mini-Program List
The Demo incorporates sample mini-programs, which are also bound to the application under the official test account. Therefore, after replacing it with your personal application configuration, the built-in mini-programs cannot be opened. If you wish to use the built-in mini-program functionality to try the mini-program bound to your personal application, you can modify the configuration as per the following instructions:
1. Configuration file path: app/src/main/assets/default_mini_apps.json.
2. The configuration file is in JSON format, with the outermost layer being an array. Each object within the array represents a built-in mini-program.
[
{
"appId":"mp225lc9che0ve9o", // Mini-Program ID
"name":"Official Sample", // Mini-Program Name
}
]
3. To replace the mini-program information in the configuration file, modify the field to the mini-program's appId.
Upon completion of the modifications, the enhanced experience is ready to be executed.
Note:
The embedded mini-program must be associated with the host application and have an officially released version.
Was this page helpful?