本文整理汇总了Java中android.accessibilityservice.AccessibilityService.performGlobalAction方法的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityService.performGlobalAction方法的具体用法?Java AccessibilityService.performGlobalAction怎么用?Java AccessibilityService.performGlobalAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.accessibilityservice.AccessibilityService
的用法示例。
在下文中一共展示了AccessibilityService.performGlobalAction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doSMZDM
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
public void doSMZDM(AccessibilityService service) {
autoLock.lock();
try {
delay(8000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(4000);
Utils.reLaunch(service, SMZDM);
delay(4000);
iteratorSMZDM(service.getRootInActiveWindow());
autoCondition.await(10, TimeUnit.SECONDS); // 10s
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(2000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(2000);
} catch (Exception e) {
e.printStackTrace();
}
autoLock.unlock();
MainPage.condition.signal();
}
示例2: doTXDM
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
public void doTXDM(AccessibilityService service) {
autoLock.lock();
try {
delay(6000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(4000);
Utils.reLaunch(service, TXDM);
delay(4000);
iteratorTXDM(service.getRootInActiveWindow(), service);
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(2000);
} catch (Exception e) {
e.printStackTrace();
}
autoLock.unlock();
MainPage.condition.signal();
}
示例3: performBack
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/**
* 返回事件
*/
public static void performBack(final AccessibilityService service, AccessibilityNodeInfo nodeInfo) {
CharSequence packageName = nodeInfo.getPackageName();
if (!(packageName+"").equals(WECHAT_PACKAGE_NAME)) {
L.d("不是微信,不能后退 " + packageName);
return;
}
if (service == null) {
L.e("performBackWithDelay service is null");
return;
}
if (service.getRootInActiveWindow() == null) {
L.e("performBackWithDelay rootNode is null");
return;
}
L.d("performBack Reboot ");
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
}
示例4: performHome
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/** 返回主界面事件*/
public static void performHome(AccessibilityService service) {
if(service == null) {
return;
}
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_HOME);
}
示例5: performGlobalAction
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
private boolean performGlobalAction(final int action) {
ensureAccessibilityServiceEnabled();
AccessibilityService service = mAccessibilityBridge.getService();
if (service == null)
return false;
return service.performGlobalAction(action);
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:8,代码来源:SimpleActionAutomator.java
示例6: doJDF
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
public void doJDF(AccessibilityService service) {
autoLock.lock();
boolean ret;
try {
delay(10000);
if (checkGestureLock(service.getRootInActiveWindow())) {
ret = autoCondition.await(20, TimeUnit.SECONDS); // 20s
if (!ret) {
autoLock.unlock();
MainPage.condition.signal();
return;
}
}
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(1000);
iteratorJDF(service.getRootInActiveWindow()); // 主页签到
delay(6000);
iteratorJDF(service.getRootInActiveWindow()); // 右上角签到
ret = autoCondition.await(20, TimeUnit.SECONDS); // 10s
//iteratorJDF(service.getRootInActiveWindow()); // 右上角钢蹦明细
//ret = autoCondition.await(30, TimeUnit.SECONDS); // 30s
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
autoLock.unlock();
MainPage.condition.signal();
}
示例7: performHome
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/**
* 返回事件
*/
public static void performHome(final AccessibilityService service) {
if (service == null) {
L.e("performBackWithDelay service is null");
return;
}
if (service.getRootInActiveWindow() == null) {
L.e("performBackWithDelay rootNode is null");
return;
}
L.d("performHome");
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_HOME);
}
示例8: performBack
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/** 返回事件*/
public static void performBack(AccessibilityService service) {
if(service == null) {
return;
}
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
}
示例9: performBack
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
public static void performBack(AccessibilityService service) {
if (service == null) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
}
}
示例10: performBack
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
public static void performBack(AccessibilityService service,Map<String,String> record, String recordAction) {
if(service == null) return;
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
recordAndLog(record,recordAction);
//record.put("recordAction",recordAction);
//System.out.println("------>"+record);
}
示例11: virtualBack
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/**
* 模拟返回键 API 16(Android 4.1)及以上才能用
*
* @param service
*/
public static void virtualBack(AccessibilityService service) {
if (VERSION.SDK_INT < 16) {
Toast.makeText(service, "Android 4.1及以上系统才支持此功能,请升级后重试", 1).show();
} else {
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
}
}
示例12: recentApps
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/**
* 模拟最近任务
*
* @param service
*/
public static void recentApps(AccessibilityService service) {
if (VERSION.SDK_INT < 16) {
Toast.makeText(service, "Android 4.1及以上系统才支持此功能,请升级后重试", 1).show();
} else {
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_RECENTS);
}
}
示例13: doJD
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
public void doJD(AccessibilityService service) {
autoLock.lock();
boolean ret;
try {
delay(4000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(3000);
Utils.reLaunch(service, JD);
delay(6000);
autoSignInJd(service.getRootInActiveWindow(), BEAN, service);
ret = autoCondition.await(20, TimeUnit.SECONDS); // 20s
delay(2000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(2000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(3000);
Utils.reLaunch(service, JD);
delay(4000);
autoSignInJd(service.getRootInActiveWindow(), VIP, service);
ret = autoCondition.await(20, TimeUnit.SECONDS); // 20s
if (!ret) {
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
}
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(1000);
autoSignInJd(service.getRootInActiveWindow(), COUPON, service);
delay(3000);
iteratorJD(service.getRootInActiveWindow());
ret = autoCondition.await(20, TimeUnit.SECONDS); // 20s
autoSignInJd(service.getRootInActiveWindow(), MONEY, service);
ret = autoCondition.await(20, TimeUnit.SECONDS); // 20s
delay(1000);
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
delay(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
autoLock.unlock();
MainPage.condition.signal();
}
示例14: performScrollForward1
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/**
* 模拟上滑操作方式一(列表数据则向下移动,似乎是查看新数据一样,如ListView)
*/
public void performScrollForward1(AccessibilityService service) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
service.performGlobalAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD);
}
}
示例15: performScrollBackward1
import android.accessibilityservice.AccessibilityService; //导入方法依赖的package包/类
/**
* 模拟下滑操作方式一(列表数据则向上移动,似乎是查看旧数据一样,如ListView)
*/
public void performScrollBackward1(AccessibilityService service) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
service.performGlobalAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD);
}
}