tencent cloud

Tencent Cloud Super App as a Service

Listening to Mini Program Lifecycle

Download
Focus Mode
Font Size
Last updated: 2025-07-04 17:33:28
You can override the onAppStateChange method in BaseMiniAppProxyImpl class to monitor the mini program lifecycle.
API description:
Parameter appState: The lifecycle status of the current mini program (defined in reference to AppState).
Parameter MiniAppEvent: Lifecycle event of the current mini program.
/**
* Callback for mini program lifecycle event
* Calling context: Main process UI thread
*
* @param appState - Event status
* @param event - Event
*/
public abstract void onAppStateChange(@AppState int appState, MiniAppEvent event);





Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback