Commit 90076315 by jeffrey

提交下 继续修改

parent 15c50b15
1 需要在设置里面开通辅助功能 名字weixinclick
2 需要root权限
3 我把间隔时间都调慢了 周一来优化下
\ No newline at end of file
...@@ -6,13 +6,13 @@ android { ...@@ -6,13 +6,13 @@ android {
debug { debug {
keyAlias 'weixinclick' keyAlias 'weixinclick'
keyPassword '123456' keyPassword '123456'
storeFile file('F:/BaiduNetdiskDownload/weixinclick/app/weixinclick.jks') storeFile file('../key.jks')
storePassword '123456' storePassword '123456'
} }
release { release {
keyAlias 'weixinclick' keyAlias 'weixinclick'
keyPassword '123456' keyPassword '123456'
storeFile file('F:/BaiduNetdiskDownload/weixinclick/app/weixinclick.jks') storeFile file('../key.jks')
storePassword '123456' storePassword '123456'
} }
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<!-- 消息接收监听器 (用户可自主扩展) --> <!-- 消息接收监听器 (用户可自主扩展) -->
<receiver <receiver
android:name="com.xf.receiver.MyMessageReceiver" android:name=".receiver.MyMessageReceiver"
android:exported="false"> android:exported="false">
<intent-filter> <intent-filter>
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" /> <action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<service <service
android:name="com.xf.weixinclick.MyAccessibilityService" android:name=".NewService"
android:enabled="true" android:enabled="true"
android:exported="true" android:exported="true"
android:label="@string/app_name" android:label="@string/app_name"
......
...@@ -6,15 +6,14 @@ import android.widget.EditText; ...@@ -6,15 +6,14 @@ import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.xf.bean.LoginBean; import com.xf.weixinclick.bean.LoginBean;
import com.xf.bean.ResponseBase; import com.xf.weixinclick.bean.ResponseBase;
import com.xf.customerview.CustomEditText; import com.xf.weixinclick.customerview.CustomEditText;
import com.xf.http.HttpClientApi; import com.xf.weixinclick.http.HttpClientApi;
import com.xf.http.HttpSubscriber; import com.xf.weixinclick.http.HttpSubscriber;
import com.xf.utils.SP; import com.xf.weixinclick.utils.SP;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.File;
import java.io.OutputStream; import java.io.OutputStream;
import butterknife.BindView; import butterknife.BindView;
......
...@@ -2,26 +2,20 @@ package com.xf.weixinclick; ...@@ -2,26 +2,20 @@ package com.xf.weixinclick;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Intent; import android.content.Intent;
import android.graphics.Bitmap;
import android.util.Log;
import android.view.View; import android.view.View;
import android.webkit.JavascriptInterface;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.EditText; import android.widget.EditText;
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory; import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
import com.google.gson.Gson; import com.xf.weixinclick.bean.msg.ReceiverMsg;
import com.xf.bean.msg.ReceiverMsg; import com.xf.weixinclick.http.HttpClientApi;
import com.xf.http.HttpClientApi; import com.xf.weixinclick.http.HttpSubscriber;
import com.xf.http.HttpSubscriber; import com.xf.weixinclick.receiver.WeChatStatus;
import com.xf.receiver.WeChatStatus; import com.xf.weixinclick.utils.SP;
import com.xf.utils.SP;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import java.util.logging.Handler;
import butterknife.BindView; import butterknife.BindView;
/** /**
...@@ -89,18 +83,31 @@ public class MainActivity extends BaseActivity { ...@@ -89,18 +83,31 @@ public class MainActivity extends BaseActivity {
public void onClick(View v) { public void onClick(View v) {
WeChatStatus.receiverMsg(); WeChatStatus.receiverMsg();
Intent intent = new Intent(); Intent intent = new Intent();
ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");// 报名该有activity //// 报名该有activity
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.setComponent(cmp); intent.setComponent(cmp);
startActivity(intent); startActivity(intent);
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
ReceiverMsg msg = new ReceiverMsg(); ReceiverMsg msg = new ReceiverMsg();
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");
EventBus.getDefault().post(msg); EventBus.getDefault().post(msg);
} }
}).start();
}
}); });
} }
......
...@@ -19,10 +19,11 @@ import android.view.accessibility.AccessibilityEvent; ...@@ -19,10 +19,11 @@ import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo;
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory; import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
import com.xf.bean.msg.ReceiverMsg; import com.xf.weixinclick.bean.msg.ReceiverMsg;
import com.xf.http.HttpClientApi; import com.xf.weixinclick.http.HttpClientApi;
import com.xf.http.HttpSubscriber; import com.xf.weixinclick.http.HttpSubscriber;
import com.xf.receiver.WeChatStatus; import com.xf.weixinclick.receiver.WeChatStatus;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.Subscribe;
...@@ -38,9 +39,9 @@ import rx.Observable; ...@@ -38,9 +39,9 @@ import rx.Observable;
import rx.android.schedulers.AndroidSchedulers; import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Func1; import rx.functions.Func1;
import static com.xf.receiver.WeChatStatus.needBack2; import static com.xf.weixinclick.receiver.WeChatStatus.needBack2;
import static com.xf.receiver.WeChatStatus.needBack4; import static com.xf.weixinclick.receiver.WeChatStatus.needClick;
import static com.xf.receiver.WeChatStatus.needClick;
/** /**
* Author:liyawei * Author:liyawei
...@@ -298,7 +299,10 @@ public class MyAccessibilityService extends AccessibilityService { ...@@ -298,7 +299,10 @@ public class MyAccessibilityService extends AccessibilityService {
Rect rect = new Rect(); Rect rect = new Rect();
n.getBoundsInScreen(rect); n.getBoundsInScreen(rect);
final float x = rect.left + tempX, y = rect.top + tempY; float x = rect.left + tempX, y = rect.top + tempY;
//test
x = 350;
y = 1110;
execShellCmd("input tap " + x + " " + y); execShellCmd("input tap " + x + " " + y);
} }
} }
...@@ -519,36 +523,36 @@ public class MyAccessibilityService extends AccessibilityService { ...@@ -519,36 +523,36 @@ public class MyAccessibilityService extends AccessibilityService {
@Override @Override
public boolean onUnbind(Intent intent) { public boolean onUnbind(Intent intent) {
EventBus.getDefault().unregister(this); // EventBus.getDefault().unregister(this);
return super.onUnbind(intent); return super.onUnbind(intent);
} }
@Override @Override
protected void onServiceConnected() { protected void onServiceConnected() {
EventBus.getDefault().register(this); // EventBus.getDefault().register(this);
} }
@Subscribe(threadMode = ThreadMode.MAIN) // @Subscribe
public void receiverMsg(final ReceiverMsg msg) { // public void receiverMsg(final ReceiverMsg msg) {
delayDeal(500, new IDelayMethord() { // delayDeal(500, new IDelayMethord() {
@Override // @Override
public void delayMethord() { // public void delayMethord() {
execShellCmd("input tap 150 200"); // execShellCmd("input tap 150 200");
} // }
}); // });
delayDeal(2000, new IDelayMethord() { // delayDeal(2000, new IDelayMethord() {
@Override // @Override
public void delayMethord() { // public void delayMethord() {
WeChatStatus.receiverMsg(); // WeChatStatus.receiverMsg();
Url = msg.getQr_addr(); // Url = msg.getQr_addr();
message_id = msg.getUnique_id(); // message_id = msg.getUnique_id();
AccessibilityEvent accessibilityEvent = AccessibilityEvent.obtain(32); // AccessibilityEvent accessibilityEvent = AccessibilityEvent.obtain(32);
accessibilityEvent.setClassName(WeChatUi); // accessibilityEvent.setClassName(WeChatUi);
onAccessibilityEvent(accessibilityEvent); // onAccessibilityEvent(accessibilityEvent);
} // }
}); // });
//
} // }
public static int dip2px(float dpValue) { public static int dip2px(float dpValue) {
float scale = myApplication.getInstence().getResources().getDisplayMetrics().density; float scale = myApplication.getInstence().getResources().getDisplayMetrics().density;
......
package com.xf.bean; package com.xf.weixinclick.bean;
import java.io.Serializable; import java.io.Serializable;
......
package com.xf.bean; package com.xf.weixinclick.bean;
import java.io.Serializable; import java.io.Serializable;
......
package com.xf.bean; package com.xf.weixinclick.bean;
import com.google.gson.Gson; import com.google.gson.Gson;
......
package com.xf.bean.msg; package com.xf.weixinclick.bean.msg;
import java.io.Serializable; import java.io.Serializable;
......
package com.xf.customerview; package com.xf.weixinclick.customerview;
import android.content.Context; import android.content.Context;
import android.content.res.TypedArray; import android.content.res.TypedArray;
......
package com.xf.http; package com.xf.weixinclick.http;
import java.util.Map; import java.util.Map;
......
package com.xf.http; package com.xf.weixinclick.http;
import com.xf.utils.SP; import com.xf.weixinclick.utils.SP;
import java.io.IOException; import java.io.IOException;
......
package com.xf.http; package com.xf.weixinclick.http;
import android.text.TextUtils; import android.text.TextUtils;
import com.bumptech.glide.request.Request;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.xf.http.stringfactory.StringConverterFactory; import com.xf.weixinclick.http.stringfactory.StringConverterFactory;
import com.xf.utils.SP; import com.xf.weixinclick.utils.SP;
import com.xf.weixinclick.BuildConfig; import com.xf.weixinclick.BuildConfig;
import com.xf.weixinclick.myApplication; import com.xf.weixinclick.myApplication;
......
package com.xf.http; package com.xf.weixinclick.http;
/** /**
* Created by Li on 2016/9/26. * Created by Li on 2016/9/26.
......
package com.xf.http; package com.xf.weixinclick.http;
import rx.Subscriber; import rx.Subscriber;
......
package com.xf.http; package com.xf.weixinclick.http;
import java.io.IOException; import java.io.IOException;
......
package com.xf.http; package com.xf.weixinclick.http;
import java.io.Serializable; import java.io.Serializable;
......
package com.xf.http; package com.xf.weixinclick.http;
/** /**
* Created by liyawei on 2016-11-09. * Created by liyawei on 2016-11-09.
......
package com.xf.http; package com.xf.weixinclick.http;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.xf.http.stringfactory; package com.xf.weixinclick.http.stringfactory;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.xf.http.stringfactory; package com.xf.weixinclick.http.stringfactory;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.xf.http.stringfactory; package com.xf.weixinclick.http.stringfactory;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.xf.http.stringfactory; package com.xf.weixinclick.http.stringfactory;
import java.io.IOException; import java.io.IOException;
......
...@@ -10,7 +10,7 @@ import android.widget.Toast; ...@@ -10,7 +10,7 @@ import android.widget.Toast;
import com.alibaba.sdk.android.push.CloudPushService; import com.alibaba.sdk.android.push.CloudPushService;
import com.alibaba.sdk.android.push.CommonCallback; import com.alibaba.sdk.android.push.CommonCallback;
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory; import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
import com.xf.utils.SP; import com.xf.weixinclick.utils.SP;
import java.util.ArrayList; import java.util.ArrayList;
......
package com.xf.rcv; package com.xf.weixinclick.rcv;
import android.content.Context; import android.content.Context;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.GridLayoutManager;
......
package com.xf.rcv; package com.xf.weixinclick.rcv;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.View; import android.view.View;
......
package com.xf.receiver; package com.xf.weixinclick.receiver;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context; import android.content.Context;
...@@ -8,7 +8,7 @@ import android.util.Log; ...@@ -8,7 +8,7 @@ import android.util.Log;
import com.alibaba.sdk.android.push.MessageReceiver; import com.alibaba.sdk.android.push.MessageReceiver;
import com.alibaba.sdk.android.push.notification.CPushMessage; import com.alibaba.sdk.android.push.notification.CPushMessage;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.xf.bean.msg.ReceiverMsg; import com.xf.weixinclick.bean.msg.ReceiverMsg;
import com.xf.weixinclick.myApplication; import com.xf.weixinclick.myApplication;
import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.EventBus;
......
package com.xf.receiver; package com.xf.weixinclick.receiver;
/** /**
* Author:liyawei * Author:liyawei
......
package com.xf.utils; package com.xf.weixinclick.utils;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
android:layout_marginTop="120dp" android:layout_marginTop="120dp"
android:src="@drawable/line_vector" /> android:src="@drawable/line_vector" />
<com.xf.customerview.CustomEditText <com.xf.weixinclick.customerview.CustomEditText
android:id="@+id/et_phone" android:id="@+id/et_phone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:background="#7d7d7d" /> android:background="#7d7d7d" />
<com.xf.customerview.CustomEditText <com.xf.weixinclick.customerview.CustomEditText
android:id="@+id/et_pwd" android:id="@+id/et_pwd"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.xf.customerview.CustomEditText <com.xf.weixinclick.customerview.CustomEditText
android:id="@+id/cet_bind_user" android:id="@+id/cet_bind_user"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="5dp" android:padding="5dp"
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
android:id="@+id/chat_view_show" android:id="@+id/chat_view_show"
android:text="设置事件" android:text="设置事件"
android:gravity="center" android:gravity="center"
android:visibility="gone"
android:textSize="50sp" android:textSize="50sp"
android:textColor="#fff" android:textColor="#fff"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -6,7 +6,7 @@ buildscript { ...@@ -6,7 +6,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
} }
} }
......
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