|
|
@@ -2,21 +2,19 @@ package com.sheep.gamegroup.util;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
import android.app.DownloadManager;
|
|
|
-import android.content.ComponentName;
|
|
|
import android.content.Context;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
import android.net.Uri;
|
|
|
-import android.provider.Settings;
|
|
|
import android.support.v7.app.AlertDialog;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
import android.view.View;
|
|
|
-import android.view.accessibility.AccessibilityManager;
|
|
|
import android.widget.ArrayAdapter;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.kfzs.duanduan.ActMain;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.CreditCard;
|
|
|
@@ -32,7 +30,6 @@ import com.sheep.gamegroup.view.activity.ActWeb;
|
|
|
import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
-import com.sheep.jiuyan.samllsheep.service.MonitorAppService;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.umeng.socialize.ShareAction;
|
|
|
@@ -41,8 +38,6 @@ import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
|
import com.umeng.socialize.media.UMImage;
|
|
|
|
|
|
import java.io.File;
|
|
|
-import java.lang.reflect.InvocationTargetException;
|
|
|
-import java.lang.reflect.Method;
|
|
|
import java.util.List;
|
|
|
import java.util.Locale;
|
|
|
|
|
|
@@ -358,7 +353,8 @@ public class TestUtil {
|
|
|
dialog.show();
|
|
|
}
|
|
|
|
|
|
- private static void copyUrl(String name) {
|
|
|
+
|
|
|
+ private static void copyUrl(final String name) {
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().getNameUrl(name)
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
@@ -370,6 +366,14 @@ public class TestUtil {
|
|
|
if (ext == null){
|
|
|
G.showToast("data数据为null");
|
|
|
} else if(TextUtils.isEmpty(ext.getUrl())) {
|
|
|
+ JSONObject data = JSONObject.parseObject(baseMessage.getData().toString());
|
|
|
+ if(data.containsKey(name)){
|
|
|
+ String url = data.getString(name);
|
|
|
+ if(!TextUtils.isEmpty(url)) {
|
|
|
+ StringUtils.CopyText(SheepApp.getInstance(), ActWeb.addUrlToken(url));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
G.showToast("data格式不正确");
|
|
|
} else {
|
|
|
StringUtils.CopyText(SheepApp.getInstance(), ActWeb.addUrlToken(ext.getUrl()));
|