微信版本号:8.0.22
基础库版本号:6.8.0 调用androidAPI:WXVideoFileObject
WXVideoFileObject fileObject = new WXVideoFileObject();
fileObject.filePath = path;
fileObject.shareScene = scene;
//用 WXVideoObject 对象初始化一个 WXMediaMessage 对象
WXMediaMessage message = new WXMediaMessage(fileObject);
message.title = title;
message.description = description;
//构造一个Req
SendMessageToWX.Req req = new SendMessageToWX.Req();
req.transaction = buildTransaction("video");
req.message = message;
req.scene = flag;
//调用api接口,发送数据到微信
api.sendReq(req);
分享出去后两三秒,微信跳出弹窗,提示“由于当前分享的应用未获得分享权限,无法分享到微信”