+1 同问 app分享的图片,明明就是采用的是bitmap,而不是setIamgePath,为什么会是提示FileProvider,为何会这样? 急急急,回复一下吧!
分享异常(android11 微信版本7.0.20),图片分享只能使用setImagePath方法?https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Share_and_Favorites/Android.html 一加8 IN 2010 , 微信版本7.0.20(微信版本7.0.19及以下无此问题) 小米 MI 10 ,微信版本7.0.20 (微信版本7.0.19及以下无此问题) [图片] //代码 if (api != null && api.isWXAppInstalled()) { Bitmap bitmap = bitmapBean.bitmap; WXImageObject imageObject = new WXImageObject(bitmap); WXMediaMessage mediaMessage = new WXMediaMessage(); mediaMessage.mediaObject = imageObject; Bitmap thumBitmap = Bitmap.createScaledBitmap(bitmap, 140, 303, true); bitmap.recycle(); mediaMessage.thumbData = bitmapToByteArray(thumBitmap, true); SendMessageToWX.Req req = new SendMessageToWX.Req(); req.transaction = "img"; req.message = mediaMessage; req.scene = bitmapBean.scene; api.sendReq(req); } else { ToastUtils.show("未安装微信"); }
2020-11-20