diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 22956b0..dbf0c76 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -4,7 +4,7 @@
+
diff --git a/app/release/atom-latest.apk b/app/release/atom-latest.apk
index 3473013..d2a889c 100644
Binary files a/app/release/atom-latest.apk and b/app/release/atom-latest.apk differ
diff --git a/app/release/output.json b/app/release/output.json
index 5137ba7..df4c1d7 100644
--- a/app/release/output.json
+++ b/app/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":173,"versionName":"1.7.3","enabled":true,"outputFile":"atom-latest.apk","fullName":"release","baseName":"release"},"path":"atom-latest.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":174,"versionName":"1.7.4","enabled":true,"outputFile":"atom-latest.apk","fullName":"release","baseName":"release"},"path":"atom-latest.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/src/main/assets/channel b/app/src/main/assets/channel
new file mode 100644
index 0000000..79e5013
--- /dev/null
+++ b/app/src/main/assets/channel
@@ -0,0 +1 @@
+baidu
\ No newline at end of file
diff --git a/app/src/main/assets/controlStatus.json b/app/src/main/assets/controlStatus.json
new file mode 100644
index 0000000..938c8dc
--- /dev/null
+++ b/app/src/main/assets/controlStatus.json
@@ -0,0 +1 @@
+{"success":0,"msg":"获取成功","control_status":"1"}
\ No newline at end of file
diff --git a/app/src/main/assets/denglu.json b/app/src/main/assets/denglu.json
new file mode 100644
index 0000000..132abb1
--- /dev/null
+++ b/app/src/main/assets/denglu.json
@@ -0,0 +1,8 @@
+{
+ "data": {
+ "phone": "19992697335",
+ "task_type": 1
+ },
+ "msg": "账号登录",
+ "success": 1
+}
\ No newline at end of file
diff --git a/app/src/main/assets/huashu.json b/app/src/main/assets/huashu.json
new file mode 100644
index 0000000..dada64d
--- /dev/null
+++ b/app/src/main/assets/huashu.json
@@ -0,0 +1,116 @@
+{
+ "msg": "获取信息成功",
+ "data": [
+ {
+ "id": "01",
+ "comment": "好几次看到你了~缘分互关一下吧!互赞三个!",
+ "type": "1"
+ },
+ {
+ "id": "02",
+ "comment": "拍的不错,好几次看到你了~缘分互关一下吧!,互赞三个!",
+ "type": "1"
+ },
+ {
+ "id": "03",
+ "comment": "你的视频真好~互关一下,互赞三个!",
+ "type": "1"
+ },
+ {
+ "id": "04",
+ "comment": "唉~好几次看到你了~缘分互关一下,互赞三个!",
+ "type": "1"
+ },
+ {
+ "id": "05",
+ "comment": "看到你好几次了~互赞三个互关吧!",
+ "type": "1"
+ },
+ {
+ "id": "06",
+ "comment": "在吗?互关一下互赞三个吧,我看到你好几次了",
+ "type": "1"
+ },
+ {
+ "id": "07",
+ "comment": "感谢关注~我的作品评论一下吧",
+ "type": "1"
+ },
+ {
+ "id": "08",
+ "comment": "最新的作品评论一下吧!感谢",
+ "type": "1"
+ },
+ {
+ "id": "09",
+ "comment": "最近发了几个好笑视频~求点赞",
+ "type": "1"
+ },
+ {
+ "id": "10",
+ "comment": "忙啥呢~互赞三个好吗?",
+ "type": "1"
+ }
+ ,
+ {
+ "id": "11",
+ "comment": "一直关注你互赞三个吧!",
+ "type": "1"
+ }
+ ,
+ {
+ "id": "12",
+ "comment": "hi~我发的搞笑视频看了吗?赞一下吧",
+ "type": "1"
+ }
+ ,
+ {
+ "id": "13",
+ "comment": "互赞三个~好吗?",
+ "type": "1"
+ }
+ ,
+ {
+ "id": "14",
+ "comment": "挺喜欢你的视频的,互关然后互赞三个吧",
+ "type": "1"
+ }
+ ,
+ {
+ "id": "15",
+ "comment": "期待更新更多作品啊~互关后互赞三个吧",
+ "type": "1"
+ }
+ ,
+ {
+ "id": "16",
+ "comment": "你好呀",
+ "type": "4"
+ }
+ ,
+ {
+ "id": "17",
+ "comment": "你的作品很好",
+ "type": "4"
+ }
+ ,
+ {
+ "id": "18",
+ "comment": "期待更新更多作品",
+ "type": "4"
+ }
+ ,
+ {
+ "id": "19",
+ "comment": "好几次看到你了~缘分互关一下吧!互赞三个!",
+ "type": "2"
+ }
+ ,
+ {
+ "id": "20",
+ "comment": "拍的不错,好几次看到你了~缘分互关一下吧!互赞三个!",
+ "type": "2"
+ }
+ ],
+ "success": 0
+}
\ No newline at end of file
diff --git a/app/src/main/assets/jiaguan.json b/app/src/main/assets/jiaguan.json
new file mode 100644
index 0000000..3339afd
--- /dev/null
+++ b/app/src/main/assets/jiaguan.json
@@ -0,0 +1,31 @@
+{
+ "data": {
+ "create_time": "2020-11-23 11:43:23",
+ "end_time": "22:00:00",
+ "func_type": "1",
+ "function_execute": {
+ "account_duration": 1,
+ "and_fans": 0,
+ "and_follow": 0,
+ "create_time": "2020-11-16 10:43:40",
+ "id": 1,
+ "is_rand_comment": 1,
+ "is_rand_follow": 1,
+ "is_rand_forward": 0,
+ "is_rand_good": 1,
+ "max_follow": 0,
+ "max_work_time": 0,
+ "min_work": 0,
+ "task_id": "1",
+ "touch_num": "0",
+ "watch_duration_max": 2,
+ "watch_duration_min": 1
+ },
+ "short_id": "tangjie0501",
+ "start_time": "08:00:00",
+ "task_id": "1",
+ "task_type": "4"
+ },
+ "msg": "执行固定任务",
+ "success": 4
+}
\ No newline at end of file
diff --git a/app/src/main/assets/meituan_cities.db b/app/src/main/assets/meituan_cities.db
new file mode 100644
index 0000000..1e2d2a4
Binary files /dev/null and b/app/src/main/assets/meituan_cities.db differ
diff --git a/app/src/main/assets/qianghongbao.json b/app/src/main/assets/qianghongbao.json
new file mode 100644
index 0000000..964a6a5
--- /dev/null
+++ b/app/src/main/assets/qianghongbao.json
@@ -0,0 +1,31 @@
+{
+ "data": {
+ "create_time": "2021-07-13 16:29:24",
+ "end_time": "16:40:00",
+ "func_type": "5",
+ "function_execute": {
+ "account_duration": "1",
+ "bag_min_coin": "0",
+ "change_time": "1",
+ "create_time": "2021-07-13 16:29:24",
+ "grab_lucky_bag": "1",
+ "grab_red_envelopes": "1",
+ "id": "3",
+ "if_quguan": "0",
+ "live_click": "1",
+ "live_num": "1",
+ "live_speech": "1",
+ "red_min_coin": "0",
+ "task_id": "0bee5c22575c7aaf1aac37c8a9a01e37",
+ "task_type": "1",
+ "touch_num": "0"
+ },
+ "short_id": "tangjie0501",
+ "short_name": "蝴蝶剑",
+ "start_time": "16:20:00",
+ "task_id": "0bee5c22575c7aaf1aac37c8a9a01e37",
+ "task_type": "4"
+ },
+ "msg": "执行固定任务",
+ "success": 4
+}
\ No newline at end of file
diff --git a/app/src/main/assets/quguan.json b/app/src/main/assets/quguan.json
new file mode 100644
index 0000000..e2986a9
--- /dev/null
+++ b/app/src/main/assets/quguan.json
@@ -0,0 +1,27 @@
+{
+ "data": {
+ "create_time": "2021-11-02 09:11:00",
+ "end_time": "12:00:00",
+ "func_type": "7",
+ "function_execute": {
+ "account_duration": "1",
+ "create_time": "2021-11-02 09:11:00",
+ "dy_number": [
+ "anan394859",
+ "I712280"
+ ],
+ "id": "45",
+ "if_quguan": "0",
+ "task_id": "2233445566778899",
+ "task_type": "1",
+ "touch_num": "0"
+ },
+ "short_id": "86733000440",
+ "short_name": "酒酿樱桃子U",
+ "start_time": "09:00:00",
+ "task_id": "2233445566778899",
+ "task_type": "4"
+ },
+ "msg": "执行固定任务",
+ "success": 4
+}
\ No newline at end of file
diff --git a/app/src/main/assets/touchTask.json b/app/src/main/assets/touchTask.json
new file mode 100644
index 0000000..1f242ce
--- /dev/null
+++ b/app/src/main/assets/touchTask.json
@@ -0,0 +1,14 @@
+{
+ "msg": "获取信息成功",
+ "data": [
+ {
+ "phone": "18533978534",
+ "name": "暗示"
+ },
+ {
+ "phone": "16533978524",
+ "name": "收到"
+ }
+ ],
+ "success": 0
+}
\ No newline at end of file
diff --git a/app/src/main/assets/xposed_init b/app/src/main/assets/xposed_init
new file mode 100644
index 0000000..07531a6
--- /dev/null
+++ b/app/src/main/assets/xposed_init
@@ -0,0 +1 @@
+com.fisherbone.fuzhu.hook.MainHook
\ No newline at end of file
diff --git a/app/src/main/assets/zhibojianliebiao.json b/app/src/main/assets/zhibojianliebiao.json
new file mode 100644
index 0000000..e792036
--- /dev/null
+++ b/app/src/main/assets/zhibojianliebiao.json
@@ -0,0 +1,13 @@
+{
+ "data": [
+ {
+ "room_name": "丽丫头",
+ "room_shortid": "liyatouma"
+ },{
+ "room_name": "神奇主妇",
+ "room_shortid": "shenqizhufu"
+ }
+ ],
+ "msg": "获取成功",
+ "success": 0
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java b/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java
index 7ed934b..940d3e0 100644
--- a/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java
+++ b/app/src/main/java/com/fisherbone/fuzhu/activity/MainActivity.java
@@ -197,7 +197,7 @@ public class MainActivity extends BaseActivity implements InfoMessage {
-
+ //adb shell pm grant com.fisherbone.fuzhu android.permission.WRITE_SECURE_SETTINGS
Settings.Secure.putString(getContentResolver(), Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "com.fisherbone.fuzhu/com.fisherbone.fuzhu.abllib.AblService");
Settings.Secure.putString(getContentResolver(), Settings.Secure.ACCESSIBILITY_ENABLED, "1");//1表示开启
if (AblUtil.isAccessibilityServiceOpen(MainActivity.this)) {
@@ -492,7 +492,7 @@ public class MainActivity extends BaseActivity implements InfoMessage {
public void onEventMainThread(PotCusBean potCusBean) {
if ("1".equals(potCusBean.getSelect())) {
if (potCusBean.getBigshotdatas().size() > 0) {
- execute("7");
+ execute("71");
}
}
if (VALUE_TWO.equals(potCusBean.getSelect())) {
@@ -750,9 +750,9 @@ public class MainActivity extends BaseActivity implements InfoMessage {
controlWindow.stutas(true);
controlWindow.closedWin();
AblViewUtil.mySleep(2);
- AblStepHandler.getInstance().setStop(false);
- Log.e("step###", "开始执行关闭抖音程序");
- AblStepHandler.sendMsg(192);
+// AblStepHandler.getInstance().setStop(false);
+// Log.e("step###", "开始执行关闭抖音程序");
+// AblStepHandler.sendMsg(192);
FinishTask();
}
diff --git a/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java b/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java
index a6f6e89..046ae10 100644
--- a/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java
+++ b/app/src/main/java/com/fisherbone/fuzhu/activity/StartTask.java
@@ -9,8 +9,10 @@ import com.fisherbone.fuzhu.ChangLiang;
import com.fisherbone.fuzhu.abllib.AblStepHandler;
import com.fisherbone.fuzhu.abllib.AblSteps;
import com.fisherbone.fuzhu.abllib.utils.AblUtil;
+import com.fisherbone.fuzhu.db.DouyinBean;
import com.fisherbone.fuzhu.db.dao.ZhanghaoDao;
import com.fisherbone.fuzhu.db.zhuanghaoBeanData;
+import com.fisherbone.fuzhu.entity.AppoBean;
import com.fisherbone.fuzhu.entity.LiveBean;
import com.fisherbone.fuzhu.entity.RecFollowBean;
import com.fisherbone.fuzhu.entity.RedEnvBean;
@@ -19,11 +21,14 @@ import com.fisherbone.fuzhu.entity.touchTaskBean;
import com.fisherbone.fuzhu.okgonet.HttpConstants;
import com.fisherbone.fuzhu.okgonet.NetApi;
import com.fisherbone.fuzhu.utils.DateUtils;
+import com.fisherbone.fuzhu.utils.GetJsonDataUtil;
import com.fisherbone.fuzhu.utils.JsonUtils;
import com.fisherbone.fuzhu.utils.ProfileSpUtils;
+import com.google.gson.Gson;
import com.lzy.okgo.model.HttpParams;
import com.lzy.okgo.model.Response;
+import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -94,7 +99,7 @@ public class StartTask {
ChangLiang.istask = false;
//领取到任务开始执行,调接口通知后台
Log.e("TIAOSHI###", "开始给后台上报拿到了停任务");
- updateTaskStatus();
+ updateTaskStatus("");
AblStepHandler.getInstance().setStop(true);
ChangLiang.isstart = "0";
if (valueZero.equals(ChangLiang.isstarttwo)) {
@@ -179,6 +184,9 @@ public class StartTask {
case "6":
tastJiexisix(body);
break;
+ case "7"://指定直播间加关任务
+ tastJiexiseven(body);
+ break;
default:
Log.e("TIAOSHI###", "执行的功能类型不匹配");
break;
@@ -192,11 +200,69 @@ public class StartTask {
}
}
+ private void tastJiexiseven(String body) {
+ Log.e("TIAOSHI###", "指定直播间的任务数据开始解析");
+ //拿到这个功能类型,然后去解析数据。
+ try {
+ //拿到json字符串,假数据
+ // String JsonData = new GetJsonDataUtil().getJson(mContext, "quguan.json");//获取assets目录下的json文件数据
+ JSONObject jsonObject = new JSONObject(body);
+ JSONObject data = jsonObject.getJSONObject("data");
+ String createTime =data.getString("create_time");
+ String endTime =data.getString("end_time");
+ String startTime =data.getString("start_time");
+ String funcType = data.getString("func_type");
+ String taskId = data.getString("task_id");//任务id
+ String shortId = data.getString("short_id");//抖音id
+ String shortName = data.getString("short_name");//抖音昵称
+ String taskType = data.getString("task_type");//固定任务
+
+ JSONObject functionExecute = data.getJSONObject("function_execute");
+ String id = functionExecute.getString("id");//-- 任务功能id
+ String taskId1 = functionExecute.getString("task_id");//-- 任务id
+ String accountDuration = functionExecute.getString("account_duration");//单账号时长(h)
+ JSONArray jsonList = functionExecute.getJSONArray("dy_number");
+ List mList = new ArrayList<>();
+ List dataBeans = new ArrayList<>();
+ for (int i = 0; i < jsonList.length(); i++) {
+ String json = (String) jsonList.get(i);
+ mList.add(json);
+ AppoBean.DataBean dataBean = new AppoBean.DataBean();
+ dataBean.setRoom_shortid(json);
+ dataBeans.add(dataBean);
+ }
+ Gson gson = new Gson();
+ String s1 = gson.toJson(mList);
+ Log.e("要执行的抖音号字符串", s1);
+ AppoBean appoBean1 = new AppoBean(dataBeans);
+ ProfileSpUtils.getInstance().saveAppoBean(appoBean1);
+ AppoBean appoBean = ProfileSpUtils.getInstance().getAppoBean();
+ List data1 = appoBean.getData();
+ Gson gsonn = new Gson();
+ String s12 = gsonn.toJson(data1);
+ Log.e("要添加的字符串", s12);//[{"login_status":"1","short_id":"xiao629972576","short_name":""}]
+ ChangLiang.task_id = taskId;//任务id
+ ChangLiang.short_id = shortId;//抖音id
+ ChangLiang.task_short_name = shortName;//任务抖音昵称
+ ChangLiang.task_type = taskType;//固定任务
+ ChangLiang.id = id;//功能id
+ String gaizaotime = gaizaotime(endTime);
+ //领取到任务开始执行,调接口通知后台
+ updateTaskStatus(funcType);
+ //执行帐号切换帐号
+ Log.e("TIAOSHI###", "执行帐号切换帐号");
+ startExecution(mContext, AblSteps.STEP_3);
+ daojishifour(30, funcType);
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ }
+
/**
* app拿到任务调用接口
*/
- private void updateTaskStatus() {
+ private void updateTaskStatus(String str) {
final HttpParams paramsPost = new HttpParams();
paramsPost.put("short_id", ChangLiang.short_id);
paramsPost.put("task_id", ChangLiang.task_id);
@@ -210,7 +276,7 @@ public class StartTask {
String msg = jsonObject.getString("msg");
String success = jsonObject.getString("success");
if (valueZero.equals(success)) {
- com.fisherbone.fuzhu.utils.ToastUtils.showToast(mContext, "开始执行新任务");
+ com.fisherbone.fuzhu.utils.ToastUtils.showToast(mContext, "开始执行新任务"+str);
Log.e("TIAOSHI###", "给后台上报任务==" + msg);
}
} catch (JSONException e) {
@@ -305,7 +371,7 @@ public class StartTask {
ProfileSpUtils.getInstance().saveProfile(recFollowBean);
Log.e("TIAOSHI###", "一键加关的数据解析成功");
//领取到任务开始执行,调接口通知后台
- updateTaskStatus();
+ updateTaskStatus(funcType);
//执行帐号切换帐号
Log.e("TIAOSHI###", "开始执行帐号切换帐号");
AblStepHandler.getInstance().setStop(false);
@@ -380,7 +446,7 @@ public class StartTask {
ChangLiang.minfans = saveFans;
Log.e("TIAOSHI###", "一键取关的数据解析成功");
//领取到任务开始执行,调接口通知后台
- updateTaskStatus();
+ updateTaskStatus(funcType);
//执行帐号切换帐号
Log.e("TIAOSHI###", "执行帐号切换帐号");
startExecution(mContext, AblSteps.STEP_3);
@@ -421,7 +487,7 @@ public class StartTask {
ChangLiang.touch_num = touchNum;//功能id
Log.e("TIAOSHI###", "幢号的数据解析成功");
- updateTaskStatus();
+ updateTaskStatus(funcType);
//如果当前登录的抖音号和后台指派任务的抖音号不一致
touchTask(touchNum, new MainActivity.Zhuanhaoretren() {
@Override
@@ -650,7 +716,7 @@ public class StartTask {
ProfileSpUtils.getInstance().saveRedEnvBean(redEnvBean);
Log.e("TIAOSHI###", "抢红包的数据解析成功");
//领取到任务开始执行,调接口通知后台
- updateTaskStatus();
+ updateTaskStatus(funcType);
Log.e("TIAOSHI###", "执行帐号切换帐号");
startExecution(mContext, AblSteps.STEP_3);
daojishifour(30, funcType);
@@ -773,7 +839,7 @@ public class StartTask {
ProfileSpUtils.getInstance().saveLiveBean(liveBean);
Log.e("TIAOSHI###", "直播间加热的数据解析成功");
//领取到任务开始执行,调接口通知后台
- updateTaskStatus();
+ updateTaskStatus(funcType);
//执行帐号切换帐号
Log.e("TIAOSHI###", "执行帐号切换帐号");
startExecution(mContext, AblSteps.STEP_3);
@@ -794,7 +860,7 @@ public class StartTask {
ChangLiang.phonenum = phone;
// ChangLiang.tasktype = 1;
ChangLiang.task_type = "1";
- updateTaskStatus();
+ updateTaskStatus("");
AblUtil.addSuspensionWindowView(mContext, controlWindow.initWindowView("4"));
} catch (JSONException e) {
e.printStackTrace();
diff --git a/app/src/main/java/com/fisherbone/fuzhu/okgonet/HttpConstants.java b/app/src/main/java/com/fisherbone/fuzhu/okgonet/HttpConstants.java
index 7e9af20..dda6762 100644
--- a/app/src/main/java/com/fisherbone/fuzhu/okgonet/HttpConstants.java
+++ b/app/src/main/java/com/fisherbone/fuzhu/okgonet/HttpConstants.java
@@ -12,14 +12,9 @@ import com.fisherbone.fuzhu.BuildConfig;
*/
public class HttpConstants {
- // public static String URiBase = "http://192.168.1.3";// ATOM本地地址
- //public static String URiBase = "http://139.186.151.48";// ATOM线上地址
-
- //public static String URiBase = BuildConfig.release;// ATOM线上地址
+ // public static String URiBase = BuildConfig.release;// ATOM线上地址
public static String URiBase = BuildConfig.debug;// ATOM线上地址
-
-
/**
* 扫码提交信息
*/
diff --git a/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep0.java b/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep0.java
index d7f5331..2919b6d 100644
--- a/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep0.java
+++ b/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep0.java
@@ -5,11 +5,17 @@ import android.os.Message;
import android.util.Log;
import android.view.accessibility.AccessibilityNodeInfo;
+import com.fisherbone.fuzhu.ChangLiang;
import com.fisherbone.fuzhu.abllib.AblService;
import com.fisherbone.fuzhu.abllib.AblStepHandler;
import com.fisherbone.fuzhu.abllib.AblSteps;
import com.fisherbone.fuzhu.abllib.BaseAblStep;
import com.fisherbone.fuzhu.abllib.utils.AblViewUtil;
+import com.fisherbone.fuzhu.db.DouyinBean;
+import com.fisherbone.fuzhu.utils.EmojiFilter;
+
+import java.util.ArrayList;
+import java.util.List;
/**
* 获得作品时间
@@ -18,7 +24,6 @@ public class TestAblStep0 extends BaseAblStep {
private String substring = "1000000";//当前的关注数
public String IFCONTIAN = "x";
private int liwusubstring;
-
@Override
public void onStep(int step, Message msg) {
switch (step) {
@@ -30,68 +35,62 @@ public class TestAblStep0 extends BaseAblStep {
case AblSteps.STEP_2:
AblViewUtil.mySleep(5);
// getNodeInfoh();
- // getNodeInfoy();
+ // AblStepHandler.sendMsg(AblSteps.STEP_50);
- //(0,562),(1080,774)
- // isContainText("关注");b
-
-// boolean b = openTiktok();
-// Log.e("TIAOSHI###", "成功打开抖音" +b);
- boolean b1 = ifShouye();
- Log.e("TIAOSHI###", "是否首页" +b1);
-// if (b && b1) {
-// Log.e("TIAOSHI###", "成功打开抖音" );
-// } else {
-// Log.e("TIAOSHI###", "没有打开抖音抖音不在首页" );
-// }
+ getdouyinid();
default:
}
}
- public boolean openTiktok() {
- boolean ifOpen = false;
- AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
- for (int i = 0; i < root.getChildCount(); i++) {
- AccessibilityNodeInfo child = root.getChild(i);
- Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
- if ("dmt.viewpager.DmtViewPager$d".equals(child.getClassName())) {
- ifOpen = true;
- }
- }
- return ifOpen;
+ private void getdouyinid() {
+
+ AblViewUtil.mySleep(2);
+ //获取抖音号
+ getdouyin();
+
+
+ DouyinBean douyinBean = new DouyinBean();
+ douyinBean.setLogin_status("1");
+ douyinBean.setShort_id(ChangLiang.short_id);
+ douyinBean.setShort_name(ChangLiang.short_name);
+
+ AblViewUtil.mySleep(2);
+ AblViewUtil.back();
+ AblViewUtil.mySleep(1);
}
- public boolean ifShouye() {
- boolean flag = false;
+
+ private void getdouyin() {
+ int num = 0;
+ List accessibilityNodeInfos = new ArrayList<>();
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
for (int i = 0; i < root.getChildCount(); i++) {
AccessibilityNodeInfo child = root.getChild(i);
- Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
- nodeZuobiao(child);
- for (int y = 0; y < child.getChildCount(); y++) {
- AccessibilityNodeInfo child1 = child.getChild(y);
- Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
- nodeZuobiao(child1);
-
- for (int j = 0; j < child1.getChildCount(); j++) {
- AccessibilityNodeInfo child2 = child1.getChild(j);
- Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child2.getContentDescription());
- nodeZuobiao(child2);
-
- if ("android.widget.TextView".equals(child2.getClassName())) {
- if (child2.getText() != null) {
- if (child2.getText().toString().equals("首页")) {
- flag = true;
- }
- }
+ Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
+ nodeZuobiao(child);
+ Rect rect = new Rect();
+ child.getBoundsInScreen(rect);
+ if (rect.top >= 564 && rect.bottom <= 761) {
+ if ("android.widget.TextView".equals(child.getClassName())) {
+ if (num < 3) {
+ accessibilityNodeInfos.add(child);
+ num = num + 1;
}
}
-
-
}
}
- return flag;
- }
+ AccessibilityNodeInfo accessibilityNodeInfoo = accessibilityNodeInfos.get(1);
+ String str = accessibilityNodeInfoo.getText().toString();
+ String[] all = str.split(":");
+ // Log.e("TIAOSHI###", "获得的抖音号==" + all[0]);
+ Log.e("TIAOSHI###", "获得的抖音号==" + all[1]);
+ ChangLiang.short_id = all[1];
+ AccessibilityNodeInfo accessibilityNodeInfo = accessibilityNodeInfos.get(0);
+ String s = accessibilityNodeInfo.getText().toString();
+ String s1 = EmojiFilter.filterEmoji(s);//去除字符串中包含的表情符号
+ Log.e("TIAOSHI###", "获得的抖音号昵称==" + s1);
+ ChangLiang.short_name = s1;
+ }
}
diff --git a/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep1.java b/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep1.java
index 64867cf..4f72629 100644
--- a/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep1.java
+++ b/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep1.java
@@ -20,7 +20,6 @@ import java.util.ArrayList;
import java.util.List;
public class TestAblStep1 extends BaseAblStep {
- private List accessibilityNodeInfos;
private DouyinDao douyinDao;
private AblService instance;
@@ -30,7 +29,22 @@ public class TestAblStep1 extends BaseAblStep {
case AblSteps.STEP_50:
instance = AblService.getInstance();
AblViewUtil.startApplication();
+ AblViewUtil.mySleep(2);
+ allowed();
douyinDao = new DouyinDao(FuzhuApplication.getContext());
+
+ closedtjDialog(AblService.getInstance());
+ AblViewUtil.mySleep(1);
+ //1.关闭检测到更新的弹框
+ closedJDialog(AblService.getInstance());
+ AblViewUtil.mySleep(1);
+ //2.关闭青少年弹窗
+ closedQDialog(AblService.getInstance());
+ AblViewUtil.mySleep(1);
+ closedBDialog(AblService.getInstance());
+ AblViewUtil.mySleep(1);
+
+
AblStepHandler.sendMsg(AblSteps.STEP_51);
break;
case AblSteps.STEP_51:
@@ -122,19 +136,7 @@ public class TestAblStep1 extends BaseAblStep {
AblViewUtil.mySleep(2);
//获取抖音号
getdouyin();
- AccessibilityNodeInfo accessibilityNodeInfoo = accessibilityNodeInfos.get(1);
- String str = accessibilityNodeInfoo.getText().toString();
- String[] all = str.split(":");
- Log.e("TIAOSHI###", "获得的抖音号==" + all[0]);
- Log.e("TIAOSHI###", "获得的抖音号==" + all[1]);
- AccessibilityNodeInfo accessibilityNodeInfo = accessibilityNodeInfos.get(0);
- String s = accessibilityNodeInfo.getText().toString();
- ChangLiang.short_id = all[1];
- String s1 = EmojiFilter.filterEmoji(s);//去除字符串中包含的表情符号
- Log.e("TIAOSHI###", "获得的抖音号昵称==" + s1);
- ChangLiang.short_name = s1;
-// SPUtils.setSP(FuzhuApplication.getContext(), FZConfig.SHORT_NAME, s1);
-// SPUtils.setSP(FuzhuApplication.getContext(), FZConfig.SHORT_ID, ChangLiang.short_id );
+
DouyinBean douyinBean = new DouyinBean();
douyinBean.setLogin_status("1");
douyinBean.setShort_id(ChangLiang.short_id);
@@ -152,7 +154,7 @@ public class TestAblStep1 extends BaseAblStep {
private void getdouyin() {
int num = 0;
- accessibilityNodeInfos = new ArrayList<>();
+ List accessibilityNodeInfos = new ArrayList<>();
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
for (int i = 0; i < root.getChildCount(); i++) {
AccessibilityNodeInfo child = root.getChild(i);
@@ -160,8 +162,7 @@ public class TestAblStep1 extends BaseAblStep {
nodeZuobiao(child);
Rect rect = new Rect();
child.getBoundsInScreen(rect);
- //(547,1437),(613,1510)
- if (rect.top >= 564 && rect.bottom <= 743) {
+ if (rect.top >= 564 && rect.bottom <= 761) {
if ("android.widget.TextView".equals(child.getClassName())) {
if (num < 3) {
accessibilityNodeInfos.add(child);
@@ -170,6 +171,18 @@ public class TestAblStep1 extends BaseAblStep {
}
}
}
+ AccessibilityNodeInfo accessibilityNodeInfoo = accessibilityNodeInfos.get(1);
+ String str = accessibilityNodeInfoo.getText().toString();
+ String[] all = str.split(":");
+ // Log.e("TIAOSHI###", "获得的抖音号==" + all[0]);
+ Log.e("TIAOSHI###", "获得的抖音号==" + all[1]);
+ ChangLiang.short_id = all[1];
+
+ AccessibilityNodeInfo accessibilityNodeInfo = accessibilityNodeInfos.get(0);
+ String s = accessibilityNodeInfo.getText().toString();
+ String s1 = EmojiFilter.filterEmoji(s);//去除字符串中包含的表情符号
+ Log.e("TIAOSHI###", "获得的抖音号昵称==" + s1);
+ ChangLiang.short_name = s1;
}
}
diff --git a/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep32.java b/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep32.java
index 7b552ca..e3ca743 100644
--- a/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep32.java
+++ b/app/src/main/java/com/fisherbone/fuzhu/step/TestAblStep32.java
@@ -38,8 +38,8 @@ public class TestAblStep32 extends NoticeBase {
case AblSteps.STEP_232:
AblViewUtil.mySleep(3);
Log.e("TIAOSHI###", "56778");
- // if (this.objects.size() == 0) {
- if (0 == 0) {
+ if (this.objects.size() == 0) {
+ // if (0 == 0) {
AblViewUtil.potgegin("停止");
return;
}
diff --git a/app_config.gradle b/app_config.gradle
index 0b0431e..ff89741 100644
--- a/app_config.gradle
+++ b/app_config.gradle
@@ -12,8 +12,8 @@ ext {
applicationId : "com.fisherbone.fuzhu",
minSdkVersion : 24,
targetSdkVersion : 29,
- versionCode : 173,
- versionName : "1.7.3",
+ versionCode : 174,
+ versionName : "1.7.4",
testInstrumentationRunner: "androidx.test.runner.AndroidJUnitRunner"
]