Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
李雅为
/
wechat_click
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3ff28541
authored
Feb 28, 2018
by
jeffrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了个点击确认
parent
0ca3ca45
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
app/src/main/java/com/xf/weixinclick/NewService.java
+34
-0
app/src/main/java/com/xf/weixinclick/receiver/WeChatStatus.java
+3
-0
No files found.
app/src/main/java/com/xf/weixinclick/NewService.java
View file @
3ff28541
...
...
@@ -35,6 +35,9 @@ import rx.functions.Func1;
import
static
com
.
xf
.
weixinclick
.
receiver
.
WeChatStatus
.
needBack2
;
import
static
com
.
xf
.
weixinclick
.
receiver
.
WeChatStatus
.
needClick
;
import
static
com
.
xf
.
weixinclick
.
receiver
.
WeChatStatus
.
needClick2
;
import
static
com
.
xf
.
weixinclick
.
receiver
.
WeChatStatus
.
needClick3
;
import
static
com
.
xf
.
weixinclick
.
receiver
.
WeChatStatus
.
needClick4
;
import
static
com
.
xf
.
weixinclick
.
receiver
.
WeChatStatus
.
status
;
/**
...
...
@@ -226,6 +229,23 @@ public class NewService extends AccessibilityService {
* 点击确认执行关注
*/
void
pressSure
()
{
List
<
AccessibilityNodeInfo
>
data1
=
getRootInActiveWindow
()
.
findAccessibilityNodeInfosByText
(
needClick2
);
List
<
AccessibilityNodeInfo
>
data2
=
getRootInActiveWindow
()
.
findAccessibilityNodeInfosByText
(
needClick3
);
List
<
AccessibilityNodeInfo
>
data3
=
getRootInActiveWindow
()
.
findAccessibilityNodeInfosByText
(
needClick4
);
AccessibilityNodeInfo
findNode
=
null
;
if
(
data1
!=
null
&&
data1
.
size
()
>
0
){
findNode
=
data1
.
get
(
0
);
}
else
if
(
data2
!=
null
&&
data2
.
size
()
>
0
){
findNode
=
data1
.
get
(
0
);
}
else
if
(
data3
!=
null
&&
data3
.
size
()
>
0
){
findNode
=
data1
.
get
(
0
);
}
if
(
findNode
==
null
){
execShellCmd
(
"input tap "
+
dip2px
(
40
)
+
" "
+
dip2px
(
315
));
delayDeal
(
3000
,
new
IDelayMethord
()
{
@Override
...
...
@@ -247,6 +267,20 @@ public class NewService extends AccessibilityService {
isPassTime
();
}
});
}
else
{
final
AccessibilityNodeInfo
finalFindNode
=
findNode
;
delayDeal
(
3000
,
new
IDelayMethord
()
{
@Override
public
void
delayMethord
()
{
Rect
rect
=
new
Rect
();
finalFindNode
.
getBoundsInScreen
(
rect
);
final
float
x
=
rect
.
left
+
dip2px
(
5
),
y
=
rect
.
top
+
dip2px
(
5
);
execShellCmd
(
"input tap "
+
x
+
" "
+
y
);
}
});
}
}
/**
...
...
app/src/main/java/com/xf/weixinclick/receiver/WeChatStatus.java
View file @
3ff28541
...
...
@@ -12,6 +12,9 @@ public class WeChatStatus {
public
final
static
String
needBack2
=
"确定"
;
public
final
static
String
needBack3
=
"二维码已过期"
;
public
final
static
String
needBack4
=
"宁波玄域"
;
public
final
static
String
needClick2
=
"确定"
;
public
final
static
String
needClick3
=
"关注"
;
public
final
static
String
needClick4
=
"登录"
;
/**
* 0.是否发送,控制跳转到微信界面,并发送二维码链接,并点击链接,此时跳转到二维码界面,加载完成会收到32事件,进入1
* 1.是否长按二维码,长安以后出弹出识别维码的文件
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment