Coder Social home page Coder Social logo

pqplayground / smarttouch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yijiebuyi/smarttouch

0.0 1.0 0.0 21.06 MB

基于UiAutomator框架,自动模拟用户手势操作,类似于触摸精灵,按键精灵的app。

Lua 0.80% Java 95.76% Makefile 1.48% HTML 1.96%

smarttouch's Introduction

SmartTouch

##SmartTouch是一款基于UiAutomator框架,自动模拟用户手势操作的app,类似于触摸精灵,按键精灵。最低支持android 4.4

SmartTouch是一个android工程,而SmartTouchLib是一个java工程。SmartTouchLib是脚本的核心运行库,它封装了UiAutomator的操作(如模拟back键,点击某个地方,打开最近的应用),上层的开发者可以编写lua脚本执行相应的操作,而lua的方法库定义在luaScript类中,具体的实现是在luaScriptImpl类中。更多的lua语音的学习参照luajava。SmartTouchLib是一个本地进程,SmartTouch应通过socket和它进行通信。ps:UiAutomator框架需运行在android>=4.4版本,需要root。

1.生成核心库.jar文件 a.通过eclipse导入SmartTouchLib的java工程 b.修改SmartTouchLib目录下的local.properties文件,设置android sdk的安装根路径 c.以Java Application方式运行CaseMain类,会在控制台找到生产的.jar文件

2.将生成的.jar文件拷贝到SmartTouch的assets目录下面

3.SmartTouch的assets目录下面libluajava.so,lualibs.lua,test.lua分别是luajava的so库,lua脚本的函数库以及脚本lua文件,test.lua的函数必须来自于lualibs.lua中,否则会导致执行失败。

lua 执行脚本

执行效果 ps:gif文件有点大,最好下载下来本地查看

smarttouch's People

Contributors

yijiebuyi avatar

Watchers

 avatar

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.