免责任声明: 任何可操作性的内容与本人无关,文章内容仅供参考学习,如有侵权损害贵公司利益,请联系作者,会立刻马上进行删除。
一、分析
目前可增加曝光阅读流量渠道入口(完成)
1. 发现页
打开小红书app选择顶部发现页(完成)
2. 搜索页
打开小红书app点击右上角搜索,进入搜索结果页(完成)
3. 关注页
打开小红书app选择顶部关注页(完成)
4. 个人页
打开小红书app点击笔记中博主头像进入个人页(完成)
5. 附近
APP端上附近页带来的流量(完成)
6. 其他
除前5个页面外其他页面带来的流量(完成)
二、主要源码
java">package accessibility.app;import android.graphics.Point;
import android.view.accessibility.AccessibilityEvent;import accessibility.AccService;
import accessibility.AccessibilityHelper;
import accessibility.BaseAccessibilityJob;
import floatwindow.FloatWindowButton;
import utils.Config;import utils.MyLog;public class ClickJob extends BaseAccessibilityJob {public static String XHS_PKG_NAME="com.xingin.xhs";private static ClickJob current;private Point p,p1,p2;private boolean mBrush=true;private boolean mClose=false;private ClickJob() {//super(new String[]{Config.PKG_IM_TOKEN,Config.PKG_HUOBI,Config.PKG_BTD});super(new String[]{XHS_PKG_NAME});//super(null);技术支持:metabycf or byc6352p=new Point();getp1p2();}public static synchronized ClickJob getInstance() {if(current == null) {current = new ClickJob();}return current;}@Overridepublic void onCreateJob(AccService service) {super.onCreateJob(service);//EventStart();}@Overridepublic void onStopJob() {super.onStopJob();}@Overridepublic void onWorking(){try {FloatWindowButton.getInstance(context).set_show("正在工作");if(Config.work_type==0){AccService.getInstance().slide(p1, p2, 600);}if(Config.work_type==1){if(mClose){AccessibilityHelper.performBack(service);mClose=false;}else {AccService.getInstance().slide(p, p, 200);mClose=true;}}}catch (Exception e){MyLog.e(e.getMessage().toString());}}@Overridepublic void onReceiveJob(AccessibilityEvent event) {super.onReceiveJob(event);if(!mIsEventWorking)return;if(!mIsTargetPackageName)return;if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED){MyLog.i("mCurrentUI="+mCurrentUI);}if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED){}}public void setClickPosition(Point p){this.p.x=p.x;this.p.y=p.y;}private void getp1p2(){try {int x=Config.screen_size.x;int y=Config.screen_size.y;p1=new Point(x/2,y/2-200);p2=new Point(x/2,y/2+200);}catch (Exception e){MyLog.e(e.getMessage());}}
}
技术支持:
UVHvvJozOTg0ODg3MuW+ruS/oe+8mmJ5YzYzNTLmiJZtZXRhYnljZueUteaKpe+8mmJ5YzAx (base64解码)