auto-common-lib
v1.0.0
Published
```js var autoCommonLib = require('auto-common-lib'); let {AutoLibSms,BackPressEvent,LogUtils} = autoCommonLib; ```
Downloads
3
Readme
使用方式(最好加入ES6特性)
var autoCommonLib = require('auto-common-lib');
let {AutoLibSms,BackPressEvent,LogUtils} = autoCommonLib;
功能使用说明
//获取短信验证码
let result = AutoLibSms.getPhoneNumberSmsFirstInBox("95561");
//双击退出脚本(常用于有UI界面的情况)
ui.emitter.on("back_pressed", e => {
BackPressEvent.handleBackEvent(e);
});
日志使用
LogUtils.infoLog("待写入日志或者Toast的内容",true);
LogUtils.warnLog("待写入日志或者Toast的内容",true);
LogUtils.errorLog("待写入日志或者Toast的内容",true);