Commit 240329228b179b7c6224a78ae16e109ee76166e6

Authored by 袁思汶
1 parent 89760718

升级

OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareMomentActivity.java
@@ -355,7 +355,14 @@ public class ShareMomentActivity extends AppCompatActivity { @@ -355,7 +355,14 @@ public class ShareMomentActivity extends AppCompatActivity {
355 killTime(); 355 killTime();
356 } else { 356 } else {
357 sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, imageUri)); 357 sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, imageUri));
358 - String pathreal = getPath(context, imageUri); 358 + if (imageUri.toString().contains("/") && imageUri.toString().contains(".")) {
  359 + String fileName = imageUri.toString().substring(imageUri.toString().lastIndexOf("/"), imageUri.toString().lastIndexOf("."));
  360 + String fileType = imageUri.toString().substring(imageUri.toString().lastIndexOf("."), imageUri.toString().length());
  361 + pathreal = AndroidQUtil.copyAndroidQFile(this, imageUri.toString(), StringUtils.decode(fileName) + fileType);
  362 + }else {
  363 + pathreal = AndroidQUtil.copyAndroidQFile(this, imageUri.toString(), System.currentTimeMillis() + ".png");
  364 + }
  365 + //String pathreal = getPath(context, imageUri);
359 String fileType = FileType.getFileType(pathreal); 366 String fileType = FileType.getFileType(pathreal);
360 if ("wbmp".equals(fileType) || pathreal == null || pathreal.endsWith("gif")) { 367 if ("wbmp".equals(fileType) || pathreal == null || pathreal.endsWith("gif")) {
361 AlertUtil.showDeftToast(context, "网家家暂不支持此格式图片分享."); 368 AlertUtil.showDeftToast(context, "网家家暂不支持此格式图片分享.");
config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "1.0.1.8", 24 + version: "1.0.1.9",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.outside_share", 26 packeg : "com.cnlive.outside_share",
27 //Lib库名称 27 //Lib库名称