val uri: Uri = UriUtils.file2Uri(File(videoPath))
val thumbBmp = BitmapFactory.decodeResource(resources, R.drawable.button_bang_bg)
val gameVideoFileObject = WXFileObject()
gameVideoFileObject.filePath = videoPath
this.grantUriPermission(
"com.tencent.mm",
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION
)
val msg = WXMediaMessage()
msg.setThumbImage(thumbBmp)
msg.title = "分享轨迹视频.mp4"
msg.description = "this is description"
msg.mediaObject = gameVideoFileObject
val req = SendMessageToWX.Req()
req.transaction = buildTransaction("appdata")
req.message = msg
req.scene = mTargetScene
api!!.sendReq(req)
02-20
1724
11-02
5275
10-01
929
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交