tencent cloud

Feedback

Opening the Mini Program

Last updated: 2024-08-06 16:00:50

Opening the mini program

When opening the mini program, the system will check whether there is a locally cached one. If not, it will automatically download the mini program from the remote server and then open it. If a cached version is available, the local mini program will be opened first while the system checks in the background for any new versions on the server.
Note
If a new version is available, it will be downloaded, and the next time you open the mini program, the updated version will be used.
Start up the mini program with the given appId
appId: The ID of the mini program
Options: Startup options for the mini program
Future<void> startMiniAppWithId(String appId, MiniStartOptions? options)
Sample code:
_tcmppFlutterPlugin.startMiniAppWithId(appId!, null);
Startup options
class MiniStartOptions {
  /// The path to enter the mini program
  String? entryPath;
 
  /// Always update the mini program at startup
  bool? isForceUpdate;
 
  /// String parameters passed to the mini program at startup
  String? params;
}
Start up the mini program via the given link
Link: The URI to start up the mini program
options: The startup options for the mini program
Future<void> startMiniAppWithLink(String link, MiniStartOptions? options)
Sample code:
_tcmppFlutterPlugin.startMiniAppWithLink(appId!, null);

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support