- 当前 Bug 的表现(可附上截图) 使用移动应用一次性订阅提示模板id错误
- 预期表现 可以正常弹出授权框
- 复现路径
- 提供一个最简复现 Demo
public static final String TEMPLATE_ID = “A0UVatJbtdv8oIibf-0RGuyJGDS19sigASsT_XXXXXX”;
public static IWXAPI api;
private static final String APP_ID = “wx8617197c668xxxxx”;
public void onCreate() {
super.onCreate();
registerToWx();
}
private void registerToWx() {
api = WXAPIFactory.createWXAPI(this, APP_ID, true);
api.registerApp(APP_ID);
sendReqToWx();
}
private void sendReqToWx() {
SubscribeMessage.Req req = new SubscribeMessage.Req();
req.scene = SendMessageToWX.Req.WXSceneSession;
req.templateID = TEMPLATE_ID;
boolean sendResult = api.sendReq(req);
Log.i(TAG,“sendResult:”+sendResult);
}