tencent cloud

Tencent Cloud Super App as a Service

Mini Program Launch Interception

Download
Focus Mode
Font Size
Last updated: 2026-03-20 19:12:07
When launching a mini program via wx.navigateToMiniProgram, scanning a QR code, scheme links, or other methods that trigger startMiniAppByLink, you can intercept it using the interceptMiniAppUrlStartup method in the MiniAppProxy for custom handling.

@ProxyService(proxy = MiniAppProxy.class)
public class MiniAppProxyImpl extends BaseMiniAppProxyImpl {
@Override
public void interceptMiniAppUrlStartup(Activity activity, String urlContent, MiniStartLinkOptions options, EventCallback callback) {
//Custom handling of mini program URLs
//Returning true in the callback prevents the SDK from launching the mini program, effectively intercepting the internal launch logic
callback.onResult(true, null);
}
}



Help and Support

Was this page helpful?

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

Feedback