Coder Social home page Coder Social logo

watermonitor's Introduction

WaterMonitor

使用系统的辅助权限功能来实现监控电话打入监听特定QQ联系人的命令,自动解锁屏幕(如果有的话),打开QQ特定的联系人并打开视频功能,主要目的是为了满足自己上班有时候监控下家里的🐶子有没有拆家

详情请见简书

编译和运行

  • 0.Server端手机登录QQ,用于监控,Client端的QQ添加Server端的QQ为好友,并在Server端的QQ面板中修改Client端的QQ账号备注格式为WaterMonitor:Client端QQ,例如QQ号码是123456,那么备注改成WaterMonitor:12345,那么当Client发送命令1到Server端,Server将会打开和QQ号码12345的视频电话,支持多个不同的Client

  • 1.import github.hellocsl.smartmonitor.utils.Privacy;这个没类只是再记录了自己默认的QQ帐号的常量,所以没上传,可以自己新建一个

  • 2.解锁脚本需要自己重新配置(如何配置?见Root和屏幕解锁),不同手机解锁方式和密码不一样,命名为MonitorUnlock.txt,并放到Sd卡根目录,以quit行为结尾

实现

辅助服务,当在锁屏或者非QQ面板的时候,分别监听AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGEDAccessibilityEvent#TYPE_NOTIFICATION_STATE_CHANGED事件可以读取到QQ的新消息,根据目标联系人和命令的解析,就可以作出相应的操作

Root和屏幕解锁

需要Root权限,因为需要进行屏幕解锁,而使用辅助权限也很难达到目的,主要使用到adb input命令来模拟滑动和点击,详情看这里

不同的手机的屏幕解锁密码或者方式不一样,所以需要自己来写脚本,脚本名字为MonitorUnlock.txt并放到Sd卡根目录,以quit行为结尾,参考我的

了解更多请见简书

效果

动图

装置

监听

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.