You need to sign in or sign up before continuing.
Commit a6a9b16e by jeffrey

把master分支的合并到newUI分支

parent 3d4647e1
......@@ -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 {
......
......@@ -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")){
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment