atom
This commit is contained in:
3
.idea/gradle.xml
generated
3
.idea/gradle.xml
generated
@@ -4,7 +4,7 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="disableWrapperSourceDistributionNotification" value="true" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
@@ -24,6 +24,7 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
Binary file not shown.
@@ -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":{}}]
|
||||
[{"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":{}}]
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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线上地址
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 扫码提交信息
|
||||
*/
|
||||
|
||||
@@ -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<AccessibilityNodeInfo> 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestAblStep1 extends BaseAblStep {
|
||||
private List<AccessibilityNodeInfo> 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<AccessibilityNodeInfo> 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user