Commit a6a9b16e by jeffrey

把master分支的合并到newUI分支

parent 3d4647e1
...@@ -22,8 +22,8 @@ android { ...@@ -22,8 +22,8 @@ android {
applicationId "com.xf.weixinclick" applicationId "com.xf.weixinclick"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 25 targetSdkVersion 25
versionCode 4 versionCode 5
versionName "1.3" versionName "1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {
......
...@@ -140,14 +140,14 @@ public class MainActivity extends BaseActivity { ...@@ -140,14 +140,14 @@ public class MainActivity extends BaseActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// WeChatStatus.receiverMsg(); // WeChatStatus.receiverMsg();
// Intent intent = new Intent(); Intent intent = new Intent();
// //// 报名该有activity //// 报名该有activity
// ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI"); ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");
// intent.setAction(Intent.ACTION_MAIN); intent.setAction(Intent.ACTION_MAIN);
// intent.addCategory(Intent.CATEGORY_LAUNCHER); 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); intent.setComponent(cmp);
// startActivity(intent); startActivity(intent);
new Thread(new Runnable() { new Thread(new Runnable() {
...@@ -163,8 +163,8 @@ public class MainActivity extends BaseActivity { ...@@ -163,8 +163,8 @@ public class MainActivity extends BaseActivity {
// msg.setQr_addr("https://weapp-dev.wangjia.com/qr.jpg?dd=1"); // msg.setQr_addr("https://weapp-dev.wangjia.com/qr.jpg?dd=1");
msg.setUnique_id("1111111111111"); 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)); 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); EventBus.getDefault().post(msg);
startWorkService(MainActivity.this,msg); // startWorkService(MainActivity.this,msg);
} }
}).start(); }).start();
...@@ -230,6 +230,11 @@ public class MainActivity extends BaseActivity { ...@@ -230,6 +230,11 @@ public class MainActivity extends BaseActivity {
ensureListenerStatus(); ensureListenerStatus();
} }
@Override
public void onBackPressed() {
// super.onBackPressed();
}
private void ensureListenerStatus(){ private void ensureListenerStatus(){
String enable = (String) SP.getParam("enable","1"); String enable = (String) SP.getParam("enable","1");
if (enable.equals("1")){ if (enable.equals("1")){
......
...@@ -57,7 +57,7 @@ public class MyMessageReceiver extends MessageReceiver { ...@@ -57,7 +57,7 @@ public class MyMessageReceiver extends MessageReceiver {
ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");// 报名该有activity ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");// 报名该有activity
intent.setAction(Intent.ACTION_MAIN); intent.setAction(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_LAUNCHER); 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); intent.setComponent(cmp);
myApplication.getInstence().startActivity(intent); myApplication.getInstence().startActivity(intent);
new Thread(new Runnable() { new Thread(new Runnable() {
...@@ -68,7 +68,7 @@ public class MyMessageReceiver extends MessageReceiver { ...@@ -68,7 +68,7 @@ public class MyMessageReceiver extends MessageReceiver {
long second = System.currentTimeMillis()/1000 - msg.getPushed_at() ; long second = System.currentTimeMillis()/1000 - msg.getPushed_at() ;
if (second < 15*60){ if (second < 15*60){
try { try {
Thread.sleep(2000); Thread.sleep(msg.getTime_config().getAfter_open_weixin_index_delay());
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); 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