This commit is contained in:
@ -32,6 +32,9 @@ import com.gh.common.constant.Config;
|
||||
import com.gh.gamecenter.BuildConfig;
|
||||
import com.gh.gamecenter.R;
|
||||
import com.gh.gamecenter.WeiBoShareActivity;
|
||||
import com.gh.gamecenter.common.utils.BitmapUtils;
|
||||
import com.gh.gamecenter.core.utils.DisplayUtils;
|
||||
import com.gh.gamecenter.common.utils.ImageUtils;
|
||||
import com.lightgame.utils.Utils;
|
||||
import com.tencent.connect.auth.QQToken;
|
||||
import com.tencent.connect.share.QQShare;
|
||||
@ -478,7 +481,7 @@ public class MessageShareUtils {
|
||||
if (isToast) {
|
||||
Utils.toast(mContext, "图片已保存到/Pictures/ghzhushou/");
|
||||
//刷新手机图片库
|
||||
refreshImage(mContext, _file);
|
||||
BitmapUtils.refreshImage(mContext, _file);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -512,17 +515,6 @@ public class MessageShareUtils {
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* 注意,第二个入参需要是 file 本身而不是 folder
|
||||
*/
|
||||
public static void refreshImage(Context context, File imageFile) {
|
||||
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
|
||||
Uri uri = Uri.fromFile(imageFile);
|
||||
intent.setData(uri);
|
||||
context.sendBroadcast(intent);
|
||||
Utils.log("保存分享图片路径:" + imageFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
// 获取保存图片通用路径
|
||||
public static String getSaveBitmapBasePath(Context context) {
|
||||
String path;
|
||||
|
||||
Reference in New Issue
Block a user