Commit 87176aedea0f1685e3c88e0e42560a5c5a461222

Authored by 袁思汶
1 parent 77393d99

文件类型分享

OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareMomentActivity.java
@@ -147,10 +147,10 @@ public class ShareMomentActivity extends AppCompatActivity { @@ -147,10 +147,10 @@ public class ShareMomentActivity extends AppCompatActivity {
147 if (equals) { 147 if (equals) {
148 link = preferences.getString("extratext", ""); 148 link = preferences.getString("extratext", "");
149 } else { 149 } else {
150 - link = bundle.get(TEXT) == null ? "" : bundle.get(TEXT) + ""; 150 + link = bundle.get(TEXT) + "";
151 } 151 }
152 152
153 - if (!StringUtils.isEmpty(link)) { 153 + if (!TextUtils.isEmpty(link)) {
154 if (link.startsWith("http")) { //链接类型 154 if (link.startsWith("http")) { //链接类型
155 Uri screenShot = equals ? Uri.parse(preferences.getString("share_screenshot_as_stream", "")) : (Uri) bundle.getParcelable("share_screenshot_as_stream"); 155 Uri screenShot = equals ? Uri.parse(preferences.getString("share_screenshot_as_stream", "")) : (Uri) bundle.getParcelable("share_screenshot_as_stream");
156 if (screenShot == null) { //二次登录链接类型不带截图 156 if (screenShot == null) { //二次登录链接类型不带截图
@@ -246,7 +246,11 @@ public class ShareMomentActivity extends AppCompatActivity { @@ -246,7 +246,11 @@ public class ShareMomentActivity extends AppCompatActivity {
246 } 246 }
247 } 247 }
248 } else if (!link.startsWith("http") && !link.contains("http") && link.length() > 0) { //文字实体类型 248 } else if (!link.startsWith("http") && !link.contains("http") && link.length() > 0) { //文字实体类型
249 - jumpReleaseActivity(context, new ArrayList<Media>(), 3, link, "nocircle"); 249 + if ("null".equals(link)){
  250 + jumpReleaseActivity(context, new ArrayList<Media>(), 3, bundle.get(SUBJECT) + "", "nocircle");
  251 + }else {
  252 + jumpReleaseActivity(context, new ArrayList<Media>(), 3, link, "nocircle");
  253 + }
250 killTime(); 254 killTime();
251 } else if (link.contains("http") && !link.startsWith("http")) { //带文字实体前缀的复合类型链接 255 } else if (link.contains("http") && !link.startsWith("http")) { //带文字实体前缀的复合类型链接
252 String linkcontext = link.replaceAll("\\s*", ""); 256 String linkcontext = link.replaceAll("\\s*", "");
app/src/main/java/com/cnlive/out_shared/momentActivity.java
@@ -35,7 +35,7 @@ public class momentActivity extends AppCompatActivity { @@ -35,7 +35,7 @@ public class momentActivity extends AppCompatActivity {
35 if (uri!=null) 35 if (uri!=null)
36 strings.add(uri.toString()); 36 strings.add(uri.toString());
37 } 37 }
38 - ARouter.getInstance().build("/out/ShareIMActivity") 38 + ARouter.getInstance().build("/out/ShareMomentActivity")
39 .withString("type", type) 39 .withString("type", type)
40 .withString("action", action) 40 .withString("action", action)
41 .withBundle("bundle", extras) 41 .withBundle("bundle", extras)
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.2.6", 24 + version: "1.0.2.7",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.outside_share", 26 packeg : "com.cnlive.outside_share",
27 //Lib库名称 27 //Lib库名称