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
a6a9b16e
authored
Mar 30, 2018
by
jeffrey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
把master分支的合并到newUI分支
parent
3d4647e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
14 deletions
+19
-14
app/build.gradle
+2
-2
app/src/main/java/com/xf/weixinclick/MainActivity.java
+15
-10
app/src/main/java/com/xf/weixinclick/NewService.java
+0
-0
app/src/main/java/com/xf/weixinclick/receiver/MyMessageReceiver.java
+2
-2
No files found.
app/build.gradle
View file @
a6a9b16e
...
...
@@ -22,8 +22,8 @@ android {
applicationId
"com.xf.weixinclick"
minSdkVersion
21
targetSdkVersion
25
versionCode
4
versionName
"1.
3
"
versionCode
5
versionName
"1.
4
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild
{
cmake
{
...
...
app/src/main/java/com/xf/weixinclick/MainActivity.java
View file @
a6a9b16e
...
...
@@ -140,14 +140,14 @@ public class MainActivity extends BaseActivity {
@Override
public
void
onClick
(
View
v
)
{
// WeChatStatus.receiverMsg();
//
Intent intent = new Intent();
//
//// 报名该有activity
//
ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");
//
intent.setAction(Intent.ACTION_MAIN);
//
intent.addCategory(Intent.CATEGORY_LAUNCHER);
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
);
//
intent.setComponent(cmp);
//
startActivity(intent);
Intent
intent
=
new
Intent
();
//// 报名该有activity
ComponentName
cmp
=
new
ComponentName
(
"com.tencent.mm"
,
"com.tencent.mm.ui.LauncherUI"
);
intent
.
setAction
(
Intent
.
ACTION_MAIN
);
intent
.
addCategory
(
Intent
.
CATEGORY_LAUNCHER
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
);
intent
.
setComponent
(
cmp
);
startActivity
(
intent
);
new
Thread
(
new
Runnable
()
{
...
...
@@ -163,8 +163,8 @@ public class MainActivity extends BaseActivity {
// msg.setQr_addr("https://weapp-dev.wangjia.com/qr.jpg?dd=1");
msg
.
setUnique_id
(
"1111111111111"
);
msg
.
setTime_config
(
new
Gson
().
fromJson
(
"{\"qrcode_timeout\":60,\"after_open_weixin_index_delay\":2000,\"after_open_weixin_file_helper_delay\":6000,\"after_paste_message_delay\":2000,\"after_send_message_delay\":2000,\"after_click_message_delay\":5000,\"long_press_qrcode_delay\":4000,\"after_click_decode_button_delay\":5000,\"after_click_confirm_button_delay\":3000}"
,
DelayBean
.
class
));
//
EventBus.getDefault().post(msg);
startWorkService
(
MainActivity
.
this
,
msg
);
EventBus
.
getDefault
().
post
(
msg
);
//
startWorkService(MainActivity.this,msg);
}
}).
start
();
...
...
@@ -230,6 +230,11 @@ public class MainActivity extends BaseActivity {
ensureListenerStatus
();
}
@Override
public
void
onBackPressed
()
{
// super.onBackPressed();
}
private
void
ensureListenerStatus
(){
String
enable
=
(
String
)
SP
.
getParam
(
"enable"
,
"1"
);
if
(
enable
.
equals
(
"1"
)){
...
...
app/src/main/java/com/xf/weixinclick/NewService.java
View file @
a6a9b16e
This diff is collapsed.
Click to expand it.
app/src/main/java/com/xf/weixinclick/receiver/MyMessageReceiver.java
View file @
a6a9b16e
...
...
@@ -57,7 +57,7 @@ public class MyMessageReceiver extends MessageReceiver {
ComponentName
cmp
=
new
ComponentName
(
"com.tencent.mm"
,
"com.tencent.mm.ui.LauncherUI"
);
// 报名该有activity
intent
.
setAction
(
Intent
.
ACTION_MAIN
);
intent
.
addCategory
(
Intent
.
CATEGORY_LAUNCHER
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
);
intent
.
setComponent
(
cmp
);
myApplication
.
getInstence
().
startActivity
(
intent
);
new
Thread
(
new
Runnable
()
{
...
...
@@ -68,7 +68,7 @@ public class MyMessageReceiver extends MessageReceiver {
long
second
=
System
.
currentTimeMillis
()/
1000
-
msg
.
getPushed_at
()
;
if
(
second
<
15
*
60
){
try
{
Thread
.
sleep
(
2000
);
Thread
.
sleep
(
msg
.
getTime_config
().
getAfter_open_weixin_index_delay
()
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
...
...
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