# 如何打开一个小程序

  • 方式一:使用Intent来启动上文创建的Activity
Intent intent = new Intent(context,JSVActivity.class);
intent.putExtra("URL","http://xxxxxxxx");//小程序启动地址
context.startActivity(intent);
1
2
3
  • 方式二:使用 mainPageProxy直接加载小程序
Intent intent = new Intent(context,JSVActivity.class);
intent.putExtra("URL","http://xxxxxxxx");//小程序启动地址
mMainPageProxy.loadIntent(intent);
1
2
3

intent中可配置的启动参数,参照 参数说明(intent & jsvconfig)

Last Updated: 12/11/2024, 9:24:25 AM