|
@@ -18,11 +18,13 @@ import android.text.Html;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
import android.util.TypedValue;
|
|
import android.util.TypedValue;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
|
|
+import android.view.ViewGroup;
|
|
|
import android.view.ViewTreeObserver;
|
|
import android.view.ViewTreeObserver;
|
|
|
import android.webkit.DownloadListener;
|
|
import android.webkit.DownloadListener;
|
|
|
import android.webkit.WebView;
|
|
import android.webkit.WebView;
|
|
|
import android.widget.ImageView;
|
|
import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
import android.widget.LinearLayout;
|
|
|
|
|
+import android.widget.RelativeLayout;
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -31,6 +33,7 @@ import com.kfzs.duanduan.utils.ApkUtils;
|
|
|
import com.mdad.sdk.mdsdk.AdManager;
|
|
import com.mdad.sdk.mdsdk.AdManager;
|
|
|
import com.mdad.sdk.mdsdk.common.AdData;
|
|
import com.mdad.sdk.mdsdk.common.AdData;
|
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
|
|
|
+import com.sheep.gamegroup.absBase.IJump;
|
|
|
import com.sheep.gamegroup.alipay.PayResult;
|
|
import com.sheep.gamegroup.alipay.PayResult;
|
|
|
import com.sheep.gamegroup.event.BigEvent;
|
|
import com.sheep.gamegroup.event.BigEvent;
|
|
|
import com.sheep.gamegroup.event.EventTypes;
|
|
import com.sheep.gamegroup.event.EventTypes;
|
|
@@ -41,13 +44,12 @@ import com.sheep.gamegroup.helper.TaskHelper;
|
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
import com.sheep.gamegroup.model.entity.BaseMessage;
|
|
|
import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
import com.sheep.gamegroup.model.entity.DialogConfig;
|
|
|
import com.sheep.gamegroup.model.entity.Ext;
|
|
import com.sheep.gamegroup.model.entity.Ext;
|
|
|
-import com.sheep.gamegroup.model.entity.FindApp;
|
|
|
|
|
import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
|
|
import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
|
|
|
import com.sheep.gamegroup.model.entity.GameAccountEntity;
|
|
import com.sheep.gamegroup.model.entity.GameAccountEntity;
|
|
|
|
|
+import com.sheep.gamegroup.model.entity.Applications;
|
|
|
import com.sheep.gamegroup.model.entity.GameEntity;
|
|
import com.sheep.gamegroup.model.entity.GameEntity;
|
|
|
import com.sheep.gamegroup.model.entity.GiftBagApp;
|
|
import com.sheep.gamegroup.model.entity.GiftBagApp;
|
|
|
import com.sheep.gamegroup.model.entity.HomeListEntity;
|
|
import com.sheep.gamegroup.model.entity.HomeListEntity;
|
|
|
-import com.sheep.gamegroup.model.entity.PlayGameEntity;
|
|
|
|
|
import com.sheep.gamegroup.model.entity.RobTask;
|
|
import com.sheep.gamegroup.model.entity.RobTask;
|
|
|
import com.sheep.gamegroup.model.entity.RouserArticlesEntity;
|
|
import com.sheep.gamegroup.model.entity.RouserArticlesEntity;
|
|
|
import com.sheep.gamegroup.model.entity.SlideshowEty;
|
|
import com.sheep.gamegroup.model.entity.SlideshowEty;
|
|
@@ -55,14 +57,13 @@ import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
|
|
|
import com.sheep.gamegroup.model.entity.TaskChild;
|
|
import com.sheep.gamegroup.model.entity.TaskChild;
|
|
|
import com.sheep.gamegroup.model.entity.TaskDescEntity;
|
|
import com.sheep.gamegroup.model.entity.TaskDescEntity;
|
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
|
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
|
|
|
|
|
+import com.sheep.gamegroup.model.entity.Release_task;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.entity.WithdrawalEty;
|
|
import com.sheep.gamegroup.model.entity.WithdrawalEty;
|
|
|
import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
|
|
import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
|
|
|
import com.sheep.gamegroup.model.util.EntityUtils;
|
|
import com.sheep.gamegroup.model.util.EntityUtils;
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.usage.AppUsageManager;
|
|
import com.sheep.gamegroup.usage.AppUsageManager;
|
|
|
-import com.sheep.gamegroup.view.activity.ActFindInformation;
|
|
|
|
|
import com.sheep.gamegroup.view.activity.GameTaskOrderListAct;
|
|
import com.sheep.gamegroup.view.activity.GameTaskOrderListAct;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogNewbieTaskList;
|
|
import com.sheep.gamegroup.view.dialog.DialogNewbieTaskList;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogShare;
|
|
import com.sheep.gamegroup.view.dialog.DialogShare;
|
|
@@ -79,6 +80,7 @@ import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.umeng.socialize.ShareAction;
|
|
import com.umeng.socialize.ShareAction;
|
|
|
import com.umeng.socialize.UMAuthListener;
|
|
import com.umeng.socialize.UMAuthListener;
|
|
|
import com.umeng.socialize.UMShareAPI;
|
|
import com.umeng.socialize.UMShareAPI;
|
|
|
|
|
+import com.umeng.socialize.UMShareListener;
|
|
|
import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
|
import com.umeng.socialize.media.UMImage;
|
|
import com.umeng.socialize.media.UMImage;
|
|
|
import com.umeng.socialize.media.UMWeb;
|
|
import com.umeng.socialize.media.UMWeb;
|
|
@@ -456,7 +458,6 @@ public class CommonUtil {
|
|
|
public static final int JUMP_XIAO_MI = 15;//小米游戏列表
|
|
public static final int JUMP_XIAO_MI = 15;//小米游戏列表
|
|
|
//TODO 这里移动积分兑换的id需要替换
|
|
//TODO 这里移动积分兑换的id需要替换
|
|
|
public static final int JUMP_EXCHANGE_CMCC = 1000025;//移动积分兑换
|
|
public static final int JUMP_EXCHANGE_CMCC = 1000025;//移动积分兑换
|
|
|
- public static final int JUMP_YM = 1000026;//有米积分
|
|
|
|
|
public static final int JUMP_GMAE = 16;//游戏
|
|
public static final int JUMP_GMAE = 16;//游戏
|
|
|
public static final int JUMP_FIND_RECOMMEND = 17;//推荐
|
|
public static final int JUMP_FIND_RECOMMEND = 17;//推荐
|
|
|
public static final int JUMP_WATCH_FOCUS = 18;//看点
|
|
public static final int JUMP_WATCH_FOCUS = 18;//看点
|
|
@@ -465,13 +466,13 @@ public class CommonUtil {
|
|
|
public static final int JUMP_FIND_GMAE = 21;//发现中的游戏
|
|
public static final int JUMP_FIND_GMAE = 21;//发现中的游戏
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 点击主页HomeList跳转
|
|
|
|
|
|
|
+ * 点击jump跳转
|
|
|
*/
|
|
*/
|
|
|
- public void goNative(Context context, HomeListEntity entity, String from) {
|
|
|
|
|
-
|
|
|
|
|
- switch (Integer.valueOf(entity.getJump())) {
|
|
|
|
|
|
|
+ public void goNative(Context context, IJump jump, String from) {
|
|
|
|
|
+ Activity activity = (Activity) context;
|
|
|
|
|
+ switch (Integer.valueOf(jump.getJump())) {
|
|
|
case JUMP_NEW_USER_TASK://新手任务
|
|
case JUMP_NEW_USER_TASK://新手任务
|
|
|
- DialogNewbieTaskList.tryShowDialog((Activity) context);
|
|
|
|
|
|
|
+ DialogNewbieTaskList.tryShowDialog(activity);
|
|
|
NEWBIE_TASK.onEvent();
|
|
NEWBIE_TASK.onEvent();
|
|
|
break;
|
|
break;
|
|
|
case JUMP_TRY_PLAY://试玩赚钱
|
|
case JUMP_TRY_PLAY://试玩赚钱
|
|
@@ -493,7 +494,7 @@ public class CommonUtil {
|
|
|
Jump2View.getInstance().goRechargeQAct(context, from);
|
|
Jump2View.getInstance().goRechargeQAct(context, from);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_WX_ASSIST://微信辅助
|
|
case JUMP_WX_ASSIST://微信辅助
|
|
|
- Jump2View.getInstance().goWeb(context, entity.getUrl(), "微信二维码辅助好友注册任务");
|
|
|
|
|
|
|
+ Jump2View.getInstance().goWeb(context, jump.getUrl(), "微信二维码辅助好友注册任务");
|
|
|
break;
|
|
break;
|
|
|
case JUMP_SUCCESSION_TASK://连续任务
|
|
case JUMP_SUCCESSION_TASK://连续任务
|
|
|
Jump2View.getInstance().goSequentialTaskView(context);
|
|
Jump2View.getInstance().goSequentialTaskView(context);
|
|
@@ -502,44 +503,51 @@ public class CommonUtil {
|
|
|
Jump2View.getInstance().goSignCardAct(context, null);
|
|
Jump2View.getInstance().goSignCardAct(context, null);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_H5_INNER://内部WebView加载H5
|
|
case JUMP_H5_INNER://内部WebView加载H5
|
|
|
- if (checkLongMao((Activity) context, entity))
|
|
|
|
|
- Jump2View.getInstance().goWeb(context, entity.getUrl(), entity.getTitle());
|
|
|
|
|
|
|
+ if (checkLongMao(activity, jump))
|
|
|
|
|
+ Jump2View.getInstance().goWeb(context, jump.getUrl(), jump.getTitle());
|
|
|
break;
|
|
break;
|
|
|
case JUMP_H5_OUTER://外部浏览器加载H5
|
|
case JUMP_H5_OUTER://外部浏览器加载H5
|
|
|
- if (checkLongMao((Activity) context, entity))
|
|
|
|
|
- Jump2View.getInstance().goWeb(context, entity.getUrl());
|
|
|
|
|
|
|
+ if (checkLongMao(activity, jump))
|
|
|
|
|
+ Jump2View.getInstance().goWeb(context, jump.getUrl());
|
|
|
break;
|
|
break;
|
|
|
case JUMP_GAME_TASK://游戏任务
|
|
case JUMP_GAME_TASK://游戏任务
|
|
|
Jump2View.getInstance().goGameMakeMoney(context, 0);
|
|
Jump2View.getInstance().goGameMakeMoney(context, 0);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_XIAN_WAN://闲玩任务
|
|
case JUMP_XIAN_WAN://闲玩任务
|
|
|
- Jump2View.getInstance().goXianwanWeb(context, null, null);
|
|
|
|
|
|
|
+ Jump2View.getInstance().goXianWanWeb(context, null);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_GAME_RECHARGE://游戏代充(游戏充值)
|
|
case JUMP_GAME_RECHARGE://游戏代充(游戏充值)
|
|
|
- Jump2View.getInstance().goGameRecharge((Activity) context, null);
|
|
|
|
|
|
|
+ Jump2View.getInstance().goGameRecharge(activity, null);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_MI_DONG://幂动科技(简单任务)
|
|
case JUMP_MI_DONG://幂动科技(简单任务)
|
|
|
- Jump2View.getInstance().goMiDong((Activity) context, null);
|
|
|
|
|
|
|
+ Jump2View.getInstance().goMiDong(activity, null);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_XIAO_MI://小米游戏列表
|
|
case JUMP_XIAO_MI://小米游戏列表
|
|
|
- Jump2View.getInstance().goXiaomiGameList((Activity) context, null);
|
|
|
|
|
|
|
+ Jump2View.getInstance().goXiaomiGameList(activity, null);
|
|
|
break;
|
|
break;
|
|
|
case JUMP_EXCHANGE_CMCC://移动积分兑换
|
|
case JUMP_EXCHANGE_CMCC://移动积分兑换
|
|
|
Jump2View.getInstance().goActExchangeCMCC(context);
|
|
Jump2View.getInstance().goActExchangeCMCC(context);
|
|
|
break;
|
|
break;
|
|
|
- case JUMP_YM://有米积分
|
|
|
|
|
- Jump2View.getInstance().goYm((Activity) context);
|
|
|
|
|
|
|
+ case IDConstant.JUMP_YM://有米积分
|
|
|
|
|
+ Jump2View.getInstance().goYm(activity);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case IDConstant.JUMP_SIGN_SHEEP://签到小绵羊
|
|
|
|
|
+ Jump2View.getInstance().goActSignSheep(activity);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case IDConstant.JUMP_GUIDE_NEW_USER://新手引导图文或视频
|
|
|
|
|
+ Jump2View.getInstance().goActGuideNewUser(activity);
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
- String url = entity.getUrl();
|
|
|
|
|
|
|
+ String url = jump.getUrl();
|
|
|
if (TextUtils.isEmpty(url))
|
|
if (TextUtils.isEmpty(url))
|
|
|
G.showToast(R.string.coming_soon);
|
|
G.showToast(R.string.coming_soon);
|
|
|
else//有链接直接跳转内部h5
|
|
else//有链接直接跳转内部h5
|
|
|
- Jump2View.getInstance().goWeb(context, entity.getUrl(), entity.getTitle());
|
|
|
|
|
|
|
+ Jump2View.getInstance().goWeb(context, jump.getUrl(), jump.getTitle());
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//以龙猫开头的则认为是龙猫app
|
|
//以龙猫开头的则认为是龙猫app
|
|
|
public static final String LONG_MAO_APP_NAME = "龙猫";
|
|
public static final String LONG_MAO_APP_NAME = "龙猫";
|
|
|
public static final String LONG_MAO_APP_PACKAGE_NAME = "com.cfyl.galesaur.guess";
|
|
public static final String LONG_MAO_APP_PACKAGE_NAME = "com.cfyl.galesaur.guess";
|
|
@@ -549,11 +557,11 @@ public class CommonUtil {
|
|
|
* 尝试跳转到龙猫竞猜
|
|
* 尝试跳转到龙猫竞猜
|
|
|
*
|
|
*
|
|
|
* @param activity
|
|
* @param activity
|
|
|
- * @param entity
|
|
|
|
|
|
|
+ * @param jump
|
|
|
* @return 判断到已经安装,返回false
|
|
* @return 判断到已经安装,返回false
|
|
|
*/
|
|
*/
|
|
|
- private boolean checkLongMao(Activity activity, HomeListEntity entity) {
|
|
|
|
|
- if (entity.getTitle() != null && entity.getTitle().startsWith(LONG_MAO_APP_NAME) && PackageUtil.isAppInstalled(SheepApp.getInstance(), LONG_MAO_APP_PACKAGE_NAME)) {
|
|
|
|
|
|
|
+ private boolean checkLongMao(Activity activity, IJump jump) {
|
|
|
|
|
+ if (jump.getTitle() != null && jump.getTitle().startsWith(LONG_MAO_APP_NAME) && PackageUtil.isAppInstalled(SheepApp.getInstance(), LONG_MAO_APP_PACKAGE_NAME)) {
|
|
|
try {
|
|
try {
|
|
|
PackageUtil.startApp(SheepApp.getInstance(), LONG_MAO_APP_PACKAGE_NAME);
|
|
PackageUtil.startApp(SheepApp.getInstance(), LONG_MAO_APP_PACKAGE_NAME);
|
|
|
} catch (Exception ignore) {
|
|
} catch (Exception ignore) {
|
|
@@ -687,7 +695,7 @@ public class CommonUtil {
|
|
|
if (AutoCheckService.IS_USE_THIS_SERVICE && !ListUtil.isEmpty(list)) {
|
|
if (AutoCheckService.IS_USE_THIS_SERVICE && !ListUtil.isEmpty(list)) {
|
|
|
ArrayList<String> packageNameList = ListUtil.emptyList();
|
|
ArrayList<String> packageNameList = ListUtil.emptyList();
|
|
|
for (TaskAcceptedEty item : list) {
|
|
for (TaskAcceptedEty item : list) {
|
|
|
- TaskReleaseEty taskReleaseEty;
|
|
|
|
|
|
|
+ Release_task taskReleaseEty;
|
|
|
TaskEty taskEty;
|
|
TaskEty taskEty;
|
|
|
if ((taskReleaseEty = item.getRelease_task()) != null && (taskEty = taskReleaseEty.getTask()) != null
|
|
if ((taskReleaseEty = item.getRelease_task()) != null && (taskEty = taskReleaseEty.getTask()) != null
|
|
|
&& taskEty.isAppAutoCommitTask() && !TextUtils.isEmpty(taskEty.getPackage_names()))
|
|
&& taskEty.isAppAutoCommitTask() && !TextUtils.isEmpty(taskEty.getPackage_names()))
|
|
@@ -909,7 +917,7 @@ public class CommonUtil {
|
|
|
/**
|
|
/**
|
|
|
* 分享
|
|
* 分享
|
|
|
*
|
|
*
|
|
|
- * @param activity
|
|
|
|
|
|
|
+ * @param activity 如果act
|
|
|
* @param url
|
|
* @param url
|
|
|
* @param type qq wx all
|
|
* @param type qq wx all
|
|
|
* @param description
|
|
* @param description
|
|
@@ -922,7 +930,7 @@ public class CommonUtil {
|
|
|
SHARE_MEDIA share_media;
|
|
SHARE_MEDIA share_media;
|
|
|
switch (type) {
|
|
switch (type) {
|
|
|
case DialogShare.ALL:
|
|
case DialogShare.ALL:
|
|
|
- ViewUtil.newInstance().showShare(activity, realUrl, description);
|
|
|
|
|
|
|
+ ViewUtil.showShareDialog(activity, realUrl, description);
|
|
|
return;
|
|
return;
|
|
|
case DialogShare.SYS_SEND:
|
|
case DialogShare.SYS_SEND:
|
|
|
SHARE_SYS_SEND.onEvent();
|
|
SHARE_SYS_SEND.onEvent();
|
|
@@ -970,7 +978,7 @@ public class CommonUtil {
|
|
|
new ShareAction(activity)
|
|
new ShareAction(activity)
|
|
|
.setPlatform(share_media)
|
|
.setPlatform(share_media)
|
|
|
.withMedia(umWeb)
|
|
.withMedia(umWeb)
|
|
|
- .setCallback(new UMShareListener())
|
|
|
|
|
|
|
+ .setCallback(activity instanceof UMShareListener ? (UMShareListener) activity : new CommonUMShareListener())
|
|
|
.share();
|
|
.share();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1063,12 +1071,23 @@ public class CommonUtil {
|
|
|
|
|
|
|
|
//尝试直接分享小绵羊
|
|
//尝试直接分享小绵羊
|
|
|
public void tryShowShareDialog(final Activity activity) {
|
|
public void tryShowShareDialog(final Activity activity) {
|
|
|
|
|
+ tryShowShareDialog(null, activity);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 尝试直接分享小绵羊
|
|
|
|
|
+ * @param action1 初始化view
|
|
|
|
|
+ * @param activity
|
|
|
|
|
+ */
|
|
|
|
|
+ public void tryShowShareDialog(final Action1<View> action1, final Activity activity) {
|
|
|
callActionWithFriendCountAndAward(new Action1<FriendAndAwardEntity>() {
|
|
callActionWithFriendCountAndAward(new Action1<FriendAndAwardEntity>() {
|
|
|
@Override
|
|
@Override
|
|
|
public void call(FriendAndAwardEntity result) {
|
|
public void call(FriendAndAwardEntity result) {
|
|
|
if (result != null) {
|
|
if (result != null) {
|
|
|
- tryShowShareDialog(activity, result.getShare_desc());
|
|
|
|
|
|
|
+ tryShowShareDialog(activity, result.getShare_desc(), action1);
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ if(action1 != null)
|
|
|
|
|
+ action1.call(null);
|
|
|
G.showToast("分享功能调试中");
|
|
G.showToast("分享功能调试中");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1077,20 +1096,27 @@ public class CommonUtil {
|
|
|
|
|
|
|
|
//显示分享对话框
|
|
//显示分享对话框
|
|
|
public void tryShowShareDialog(final Activity activity, final String description) {
|
|
public void tryShowShareDialog(final Activity activity, final String description) {
|
|
|
|
|
+ tryShowShareDialog(activity, description, null);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //显示分享对话框
|
|
|
|
|
+ public void tryShowShareDialog(final Activity activity, final String description, final Action1<View> action1) {
|
|
|
CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
|
|
CommonUtil.getInstance().callActionWithUserInfo(new Action1<UserEntity>() {
|
|
|
@Override
|
|
@Override
|
|
|
public void call(UserEntity userEntity) {
|
|
public void call(UserEntity userEntity) {
|
|
|
if (userEntity == null) {
|
|
if (userEntity == null) {
|
|
|
G.showToast("分享功能调试中");
|
|
G.showToast("分享功能调试中");
|
|
|
|
|
+ if(action1 != null)
|
|
|
|
|
+ action1.call(null);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
String url = userEntity.getShareLink();
|
|
String url = userEntity.getShareLink();
|
|
|
- ViewUtil.showShareDialog(activity, url, description);
|
|
|
|
|
|
|
+ ViewUtil.showShareDialog(activity, url, description, action1);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static class UMShareListener implements com.umeng.socialize.UMShareListener {
|
|
|
|
|
|
|
+ public static class CommonUMShareListener implements com.umeng.socialize.UMShareListener {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onStart(SHARE_MEDIA share_media) {
|
|
public void onStart(SHARE_MEDIA share_media) {
|
|
@@ -1395,7 +1421,7 @@ public class CommonUtil {
|
|
|
|
|
|
|
|
|
|
|
|
|
//对---游戏任务中的预约任务----进行---预约操作
|
|
//对---游戏任务中的预约任务----进行---预约操作
|
|
|
- public void reservationGameTask(final Context context, final TaskReleaseEty taskReleaseEty, final Action1<Integer> action1) {
|
|
|
|
|
|
|
+ public void reservationGameTask(final Context context, final Release_task taskReleaseEty, final Action1<Integer> action1) {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("device_id", DeviceUtil.getDeviceId(context));
|
|
jsonObject.put("device_id", DeviceUtil.getDeviceId(context));
|
|
|
jsonObject.put("release_task_id", taskReleaseEty.getId());
|
|
jsonObject.put("release_task_id", taskReleaseEty.getId());
|
|
@@ -1510,7 +1536,7 @@ public class CommonUtil {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void giveUpTask(final Context context, final TaskReleaseEty taskReleaseEty, final Action1<Integer> action1) {
|
|
|
|
|
|
|
+ private void giveUpTask(final Context context, final Release_task taskReleaseEty, final Action1<Integer> action1) {
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().giveUpTask(taskReleaseEty.getAccepted_task_id())
|
|
SheepApp.getInstance().getNetComponent().getApiService().giveUpTask(taskReleaseEty.getAccepted_task_id())
|
|
|
.subscribeOn(Schedulers.io())
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
@@ -1527,7 +1553,7 @@ public class CommonUtil {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void tryGiveUpTask(final Context context, final TaskReleaseEty taskReleaseEty, final Action1<Integer> action1) {
|
|
|
|
|
|
|
+ public void tryGiveUpTask(final Context context, final Release_task taskReleaseEty, final Action1<Integer> action1) {
|
|
|
ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("提示")
|
|
ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("提示")
|
|
|
.setMsg("是否放弃正在运行中的任务").setBtnRightText("否")
|
|
.setMsg("是否放弃正在运行中的任务").setBtnRightText("否")
|
|
|
.setBtnLeftText("是").setBtnLeftOnClickListener(new View.OnClickListener() {
|
|
.setBtnLeftText("是").setBtnLeftOnClickListener(new View.OnClickListener() {
|
|
@@ -1838,6 +1864,15 @@ public class CommonUtil {
|
|
|
* @param tabLayout
|
|
* @param tabLayout
|
|
|
*/
|
|
*/
|
|
|
public void reflex(final TabLayout tabLayout, final Context context) {
|
|
public void reflex(final TabLayout tabLayout, final Context context) {
|
|
|
|
|
+ reflex(tabLayout, context, false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 通过反射调整tabLayout中下划线的宽度
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param tabLayout
|
|
|
|
|
+ */
|
|
|
|
|
+ public void reflex(final TabLayout tabLayout, final Context context, final boolean reMeasure) {
|
|
|
//了解源码得知 线的宽度是根据 tabView的宽度来设置的
|
|
//了解源码得知 线的宽度是根据 tabView的宽度来设置的
|
|
|
tabLayout.post(new Runnable() {
|
|
tabLayout.post(new Runnable() {
|
|
|
@Override
|
|
@Override
|
|
@@ -1865,7 +1900,7 @@ public class CommonUtil {
|
|
|
//因为我想要的效果是 字多宽线就多宽,所以测量mTextView的宽度
|
|
//因为我想要的效果是 字多宽线就多宽,所以测量mTextView的宽度
|
|
|
int width = 0;
|
|
int width = 0;
|
|
|
width = mTextView.getWidth();
|
|
width = mTextView.getWidth();
|
|
|
- if (width == 0) {
|
|
|
|
|
|
|
+ if (width == 0 || reMeasure) {
|
|
|
mTextView.measure(0, 0);
|
|
mTextView.measure(0, 0);
|
|
|
width = mTextView.getMeasuredWidth();
|
|
width = mTextView.getMeasuredWidth();
|
|
|
}
|
|
}
|
|
@@ -1909,6 +1944,20 @@ public class CommonUtil {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //设置无数据距离上面的距离
|
|
|
|
|
+ public void setEmptyViewMargin(View empty_view, int topMargin, int bottomMargin) {
|
|
|
|
|
+ if(empty_view != null) {
|
|
|
|
|
+ ViewGroup.LayoutParams layoutParams = empty_view.getLayoutParams();
|
|
|
|
|
+ if(layoutParams instanceof RelativeLayout.LayoutParams) {
|
|
|
|
|
+ ((RelativeLayout.LayoutParams) layoutParams).topMargin = topMargin;
|
|
|
|
|
+ ((RelativeLayout.LayoutParams) layoutParams).bottomMargin = bottomMargin;
|
|
|
|
|
+ } else if(layoutParams instanceof LinearLayout.LayoutParams) {
|
|
|
|
|
+ ((LinearLayout.LayoutParams) layoutParams).topMargin = topMargin;
|
|
|
|
|
+ ((LinearLayout.LayoutParams) layoutParams).bottomMargin = bottomMargin;
|
|
|
|
|
+ }
|
|
|
|
|
+ empty_view.setLayoutParams(layoutParams);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
//设置无数据显示
|
|
//设置无数据显示
|
|
|
public void updateEmptyView(View empty_view, boolean showEmpty) {
|
|
public void updateEmptyView(View empty_view, boolean showEmpty) {
|
|
|
updateEmptyView(empty_view, showEmpty, false);
|
|
updateEmptyView(empty_view, showEmpty, false);
|
|
@@ -1978,7 +2027,7 @@ public class CommonUtil {
|
|
|
/**
|
|
/**
|
|
|
* 小米游戏账号领取
|
|
* 小米游戏账号领取
|
|
|
*/
|
|
*/
|
|
|
- public void xiaomiRevieceAcctoun(TextView find_information_game_task_top, final Object items, final Activity activity) {
|
|
|
|
|
|
|
+ public void xiaomiRevieceAcctoun(TextView find_information_game_task_top, final Object item, final Activity activity) {
|
|
|
XIAOMI_GAME_RECEIVE.onEvent();
|
|
XIAOMI_GAME_RECEIVE.onEvent();
|
|
|
find_information_game_task_top.setText("领取福利号");
|
|
find_information_game_task_top.setText("领取福利号");
|
|
|
find_information_game_task_top.setOnClickListener(new View.OnClickListener() {
|
|
find_information_game_task_top.setOnClickListener(new View.OnClickListener() {
|
|
@@ -1986,16 +2035,14 @@ public class CommonUtil {
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
- if (items instanceof XiaomiGameEntity) {
|
|
|
|
|
|
|
+ if (item instanceof XiaomiGameEntity) {
|
|
|
|
|
|
|
|
- jsonObject.put("id", ((XiaomiGameEntity) items).getId());
|
|
|
|
|
- } else if (items instanceof FindApp) {
|
|
|
|
|
- jsonObject.put("id", ((FindApp) items).getId());
|
|
|
|
|
- } else if (items instanceof PlayGameEntity) {
|
|
|
|
|
- jsonObject.put("id", ((PlayGameEntity) items).getId());
|
|
|
|
|
|
|
+ jsonObject.put("id", ((XiaomiGameEntity) item).getId());
|
|
|
|
|
+ } else if (item instanceof Applications) {
|
|
|
|
|
+ jsonObject.put("id", ((Applications) item).getId());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- ViewUtil.newInstance().showProgress((Activity) activity);
|
|
|
|
|
|
|
+ ViewUtil.newInstance().showProgress(activity);
|
|
|
SheepApp.getInstance()
|
|
SheepApp.getInstance()
|
|
|
.getNetComponent()
|
|
.getNetComponent()
|
|
|
.getApiService()
|
|
.getApiService()
|
|
@@ -2006,7 +2053,7 @@ public class CommonUtil {
|
|
|
@Override
|
|
@Override
|
|
|
public void onError(BaseMessage baseMessage) {
|
|
public void onError(BaseMessage baseMessage) {
|
|
|
G.showToast(baseMessage.getMsg());
|
|
G.showToast(baseMessage.getMsg());
|
|
|
- ViewUtil.newInstance().hideProgress((Activity) activity);
|
|
|
|
|
|
|
+ ViewUtil.newInstance().hideProgress(activity);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@SuppressLint({"StringFormatInvalid", "LocalSuppress"})
|
|
@SuppressLint({"StringFormatInvalid", "LocalSuppress"})
|
|
@@ -2076,35 +2123,34 @@ public class CommonUtil {
|
|
|
DownLoadInfo task = (DownLoadInfo) event.getData();
|
|
DownLoadInfo task = (DownLoadInfo) event.getData();
|
|
|
String url = task.getMDownloadUrl();
|
|
String url = task.getMDownloadUrl();
|
|
|
TextView tvProgress = view.findViewWithTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + url);
|
|
TextView tvProgress = view.findViewWithTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + url);
|
|
|
- switch (event.getEventTypes()) {
|
|
|
|
|
- case DOWNLOAD_RUNNING:
|
|
|
|
|
- try {
|
|
|
|
|
- int p = task.getMPercent(); //任务进度百分比
|
|
|
|
|
- String speed = task.getAverageSpeed(); //转换单位后的下载速度,单位转换需要在配置文件中打开
|
|
|
|
|
- if (tvProgress == null) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- if(isShowSpeed)
|
|
|
|
|
- tvProgress.setText(String.format(Locale.CHINA, "%d%%(%s)", Math.abs(p), speed));//添加下载速度
|
|
|
|
|
- else
|
|
|
|
|
- tvProgress.setText(String.format(Locale.CHINA, "%d%%", Math.abs(p)));
|
|
|
|
|
|
|
+ if(tvProgress != null) {
|
|
|
|
|
+ switch (event.getEventTypes()) {
|
|
|
|
|
+ case DOWNLOAD_RUNNING:
|
|
|
|
|
+ try {
|
|
|
|
|
+ int p = task.getMPercent(); //任务进度百分比
|
|
|
|
|
+ String speed = task.getAverageSpeed(); //转换单位后的下载速度,单位转换需要在配置文件中打开
|
|
|
|
|
+ if (isShowSpeed)
|
|
|
|
|
+ tvProgress.setText(String.format(Locale.CHINA, "%d%%(%s)", Math.abs(p), speed));//添加下载速度
|
|
|
|
|
+ else
|
|
|
|
|
+ tvProgress.setText(String.format(Locale.CHINA, "%d%%", Math.abs(p)));
|
|
|
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case DOWNLOAD_STOP:
|
|
|
|
|
- tvProgress.setText("继续下载");
|
|
|
|
|
- break;
|
|
|
|
|
- case DOWNLOAD_COMPLETE:
|
|
|
|
|
- tvProgress.setText("安装游戏");
|
|
|
|
|
- break;
|
|
|
|
|
- case DOWNLOAD_CANCEL:
|
|
|
|
|
- tvProgress.setText("下载取消");
|
|
|
|
|
- break;
|
|
|
|
|
- case DOWNLOAD_FAIL:
|
|
|
|
|
- tvProgress.setText("下载失败");
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ case DOWNLOAD_STOP:
|
|
|
|
|
+ tvProgress.setText("继续下载");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case DOWNLOAD_COMPLETE:
|
|
|
|
|
+ tvProgress.setText("安装游戏");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case DOWNLOAD_CANCEL:
|
|
|
|
|
+ tvProgress.setText("下载取消");
|
|
|
|
|
+ break;
|
|
|
|
|
+ case DOWNLOAD_FAIL:
|
|
|
|
|
+ tvProgress.setText("下载失败");
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2256,7 +2302,7 @@ public class CommonUtil {
|
|
|
* @param textView
|
|
* @param textView
|
|
|
* @param taskReleaseEty
|
|
* @param taskReleaseEty
|
|
|
*/
|
|
*/
|
|
|
- public void setTaskTagText(TextView textView, TaskReleaseEty taskReleaseEty) {
|
|
|
|
|
|
|
+ public void setTaskTagText(TextView textView, Release_task taskReleaseEty) {
|
|
|
textView.setVisibility(View.VISIBLE);
|
|
textView.setVisibility(View.VISIBLE);
|
|
|
ViewUtil.setColorMapText(textView, String.format(Locale.CHINA, "%s", taskReleaseEty.getCashOrWelfare()), taskReleaseEty.getCashOrWelfare(), "#FD2D54");
|
|
ViewUtil.setColorMapText(textView, String.format(Locale.CHINA, "%s", taskReleaseEty.getCashOrWelfare()), taskReleaseEty.getCashOrWelfare(), "#FD2D54");
|
|
|
textView.setBackgroundResource(R.drawable.shape_red_stroke_rectangle_no_lb);
|
|
textView.setBackgroundResource(R.drawable.shape_red_stroke_rectangle_no_lb);
|
|
@@ -2367,7 +2413,7 @@ public class CommonUtil {
|
|
|
Jump2View.getInstance().goGameMakeMoney(activity, 0);
|
|
Jump2View.getInstance().goGameMakeMoney(activity, 0);
|
|
|
break;
|
|
break;
|
|
|
case 12://闲玩任务
|
|
case 12://闲玩任务
|
|
|
- Jump2View.getInstance().goXianwanWeb(activity, null, null);
|
|
|
|
|
|
|
+ Jump2View.getInstance().goXianWanWeb(activity, null);
|
|
|
break;
|
|
break;
|
|
|
case 13://游戏代充
|
|
case 13://游戏代充
|
|
|
Jump2View.getInstance().goGameRecharge(activity, null);
|
|
Jump2View.getInstance().goGameRecharge(activity, null);
|
|
@@ -2451,16 +2497,19 @@ public class CommonUtil {
|
|
|
* 0,--------1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
|
|
* 0,--------1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
|
|
|
*/
|
|
*/
|
|
|
public void palyGameDetailBtnValue(final Context context, final GameEntity gameEntity, final TextView detail_task_tv_center, final int type) {
|
|
public void palyGameDetailBtnValue(final Context context, final GameEntity gameEntity, final TextView detail_task_tv_center, final int type) {
|
|
|
- final TaskReleaseEty releaseEty = gameEntity.getRelease_task();
|
|
|
|
|
|
|
+ if (detail_task_tv_center == null)
|
|
|
|
|
+ return;
|
|
|
|
|
+ final boolean showSimpleText = detail_task_tv_center.getText().length() < 4;
|
|
|
|
|
+ final Release_task releaseEty = gameEntity.getRelease_task();
|
|
|
final TaskEty taskEty = releaseEty != null ? releaseEty.getTask() : null;
|
|
final TaskEty taskEty = releaseEty != null ? releaseEty.getTask() : null;
|
|
|
if (releaseEty != null && taskEty != null) {//游戏任务
|
|
if (releaseEty != null && taskEty != null) {//游戏任务
|
|
|
|
|
|
|
|
if (taskEty.isGameReservationCantDownload()) {//预约
|
|
if (taskEty.isGameReservationCantDownload()) {//预约
|
|
|
if (gameEntity.getStatus() == 1 || gameEntity.getStatus() == 2 || gameEntity.getStatus() == 3) {
|
|
if (gameEntity.getStatus() == 1 || gameEntity.getStatus() == 2 || gameEntity.getStatus() == 3) {
|
|
|
- detail_task_tv_center.setText("已经预约");
|
|
|
|
|
|
|
+ detail_task_tv_center.setText(DownloadTextUtl.getHasReservationText(showSimpleText));
|
|
|
detail_task_tv_center.setEnabled(false);
|
|
detail_task_tv_center.setEnabled(false);
|
|
|
} else {
|
|
} else {
|
|
|
- detail_task_tv_center.setText("预约下载");
|
|
|
|
|
|
|
+ detail_task_tv_center.setText(DownloadTextUtl.getReservationText(showSimpleText));
|
|
|
detail_task_tv_center.setEnabled(true);
|
|
detail_task_tv_center.setEnabled(true);
|
|
|
if (type == 0) {
|
|
if (type == 0) {
|
|
|
detail_task_tv_center.setOnClickListener(new View.OnClickListener() {
|
|
detail_task_tv_center.setOnClickListener(new View.OnClickListener() {
|
|
@@ -2471,7 +2520,7 @@ public class CommonUtil {
|
|
|
public void call(Integer integer) {
|
|
public void call(Integer integer) {
|
|
|
if (integer > 0) {
|
|
if (integer > 0) {
|
|
|
gameEntity.setAccepted_task_id(integer);
|
|
gameEntity.setAccepted_task_id(integer);
|
|
|
- detail_task_tv_center.setText("已预约");
|
|
|
|
|
|
|
+ detail_task_tv_center.setText(DownloadTextUtl.getHasReservationText(showSimpleText));
|
|
|
detail_task_tv_center.setEnabled(false);
|
|
detail_task_tv_center.setEnabled(false);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -2537,7 +2586,7 @@ public class CommonUtil {
|
|
|
* 抢任务
|
|
* 抢任务
|
|
|
*/
|
|
*/
|
|
|
public void robTask(final Action1<RobTask> action1) {
|
|
public void robTask(final Action1<RobTask> action1) {
|
|
|
- SheepApp.getInstance().getNetComponent().getApiService().getNewTask(SheepApp.getInstance().getOrder())
|
|
|
|
|
|
|
+ SheepApp.getInstance().getNetComponent().getApiService().getNewTask(DataUtil.getAsInt(DataKey.KEY_ORDER, 1))
|
|
|
.subscribeOn(Schedulers.io())
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
@@ -2639,7 +2688,7 @@ public class CommonUtil {
|
|
|
/**
|
|
/**
|
|
|
* 给任务设置标签
|
|
* 给任务设置标签
|
|
|
*/
|
|
*/
|
|
|
- public void setTaskTag(Context context, View itemView, TaskReleaseEty taskReleaseEty, String show_type) {
|
|
|
|
|
|
|
+ public void setTaskTag(Context context, View itemView, Release_task taskReleaseEty, String show_type) {
|
|
|
if (!TextUtils.isEmpty(show_type)) {
|
|
if (!TextUtils.isEmpty(show_type)) {
|
|
|
switch (show_type) {
|
|
switch (show_type) {
|
|
|
case TASK_AUDIT:
|
|
case TASK_AUDIT:
|
|
@@ -2656,6 +2705,7 @@ public class CommonUtil {
|
|
|
TaskHelper.setNumText((TextView) itemView.findViewById(R.id.item_num_tv1), taskReleaseEty);
|
|
TaskHelper.setNumText((TextView) itemView.findViewById(R.id.item_num_tv1), taskReleaseEty);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//使webView支持下载文件
|
|
//使webView支持下载文件
|
|
|
public void setDownloadListener(final Activity activity, WebView webView) {
|
|
public void setDownloadListener(final Activity activity, WebView webView) {
|
|
|
webView.setDownloadListener(new DownloadListener() {
|
|
webView.setDownloadListener(new DownloadListener() {
|
|
@@ -2666,6 +2716,7 @@ public class CommonUtil {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//使webView支持下载文件
|
|
//使webView支持下载文件
|
|
|
public void setDownloadListener(final Activity activity, com.tencent.smtt.sdk.WebView webView) {
|
|
public void setDownloadListener(final Activity activity, com.tencent.smtt.sdk.WebView webView) {
|
|
|
webView.setDownloadListener(new com.tencent.smtt.sdk.DownloadListener() {
|
|
webView.setDownloadListener(new com.tencent.smtt.sdk.DownloadListener() {
|
|
@@ -2677,17 +2728,18 @@ public class CommonUtil {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
//显示下载提示框
|
|
//显示下载提示框
|
|
|
- public void showDownloadDialog(final Activity activity, final String url){
|
|
|
|
|
|
|
+ public void showDownloadDialog(final Activity activity, final String url) {
|
|
|
final String fileName = com.sheep.gamegroup.util.FileUtil.getFileName(url);
|
|
final String fileName = com.sheep.gamegroup.util.FileUtil.getFileName(url);
|
|
|
final File saveFile = new File(DIR, fileName);
|
|
final File saveFile = new File(DIR, fileName);
|
|
|
final boolean exists = saveFile.exists();
|
|
final boolean exists = saveFile.exists();
|
|
|
ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("下载提示")
|
|
ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("下载提示")
|
|
|
- .setMsg((exists ? "是否重新下载文件:" : "是否下载文件:" )+ saveFile.getAbsolutePath()).setBtnLeftText("取消下载").setBtnRightText("确认下载")
|
|
|
|
|
|
|
+ .setMsg((exists ? "是否重新下载文件:" : "是否下载文件:") + saveFile.getAbsolutePath()).setBtnLeftText("取消下载").setBtnRightText("确认下载")
|
|
|
.setBtnRightOnClickListener(new View.OnClickListener() {
|
|
.setBtnRightOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
public void onClick(View view) {
|
|
|
- if(exists && saveFile.delete()){
|
|
|
|
|
|
|
+ if (exists && saveFile.delete()) {
|
|
|
LogUtil.println("setDownloadListener", "setDownloadListener", "onDownloadStart", url, saveFile.getAbsolutePath(), "成功删除原来的文件");
|
|
LogUtil.println("setDownloadListener", "setDownloadListener", "onDownloadStart", url, saveFile.getAbsolutePath(), "成功删除原来的文件");
|
|
|
}
|
|
}
|
|
|
DownloadService.sysDownload(activity, url, fileName, "来自小绵羊的下载:" + fileName, fileName, "系统开始下载apk");
|
|
DownloadService.sysDownload(activity, url, fileName, "来自小绵羊的下载:" + fileName, fileName, "系统开始下载apk");
|