本地APP 接入的wechat-sdk 目前只有唤起电子发票列表的接口吗?是否提供唤起发票抬头列表?没有找到相关的接口。我尝试用app 直接去唤起小程序《微信发票助手》,但是虽然可以唤起,但是却没法选择发票抬头回调。是否有解决方法呢,急求!!!!
/**
* 拉起微信小程序
*/
public static final void getWxMiniProgram() {
if (WlbCoreApplication.getInstance().getApi().isWXAppInstalled()) {
WXLaunchMiniProgram.Req req = new WXLaunchMiniProgram.Req();
req.userName = "gh_3610de7f9728"; // 填小程序原始id
req.path = ""; ////拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。
req.miniprogramType = WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE;// 可选打开 开发版,体验版和正式版
if (req.checkArgs()){
WlbCoreApplication.getInstance().getApi().sendReq(req);
}
} else {
ToastUtil.showMessage(WlbCoreApplication.getContext(), "未安装微信,无法分享");
}
}
/**
* 发起获取发票请求
*/
public static final void getWxInvoice() {
if (WlbCoreApplication.getInstance().getApi().isWXAppInstalled()) {
//时间戳
String timeStamp = String.valueOf(System.currentTimeMillis() / 1000);
ChooseCardFromWXCardPackage.Req req = new ChooseCardFromWXCardPackage.Req();
//微信开发者账号appId
req.appId = ConstValue.WECHAT_APP_ID;
//类型:获取发票
req.cardType = "INVOICE";
//随机字符串
req.nonceStr = timeStamp;
//时间戳
req.timeStamp = timeStamp;
//签名类型SHA1
req.signType = "SHA1";
req.locationId = "";
req.cardId = "";
req.canMultiSelect = "1";
//签名
req.cardSign = createSign(req.appId, req.nonceStr, req.nonceStr, req.cardType);
if (req.checkArgs()){
WlbCoreApplication.getInstance().getApi().sendReq(req);
}
} else {
ToastUtil.showMessage(WlbCoreApplication.getContext(), "未安装微信,无法分享");
}
}