tencent cloud

Tencent Cloud Super App as a Service

Perjanjian
Perjanjian Pemrosesan dan Keamanan Data
DokumentasiTencent Cloud Super App as a Service

Mini Program Launch Interception

Mode fokus
Ukuran font
Terakhir diperbarui: 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);
}
}



Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan