當前位置: 首頁>>代碼示例>>Java>>正文


Java AccessibilityService.performGlobalAction方法代碼示例

本文整理匯總了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();
}
 
開發者ID:Sl0v3C,項目名稱:Android_AutoSignInTool,代碼行數:23,代碼來源:autoSignInSMZDM.java

示例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();
}
 
開發者ID:Sl0v3C,項目名稱:Android_AutoSignInTool,代碼行數:21,代碼來源:autoSignInTXDM.java

示例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);
}
 
開發者ID:kaixuanluo,項目名稱:pc-android-controller-android,代碼行數:21,代碼來源:AccessUtil.java

示例4: performHome

import android.accessibilityservice.AccessibilityService; //導入方法依賴的package包/類
/** 返回主界麵事件*/
public static void performHome(AccessibilityService service) {
    if(service == null) {
        return;
    }
    service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_HOME);
}
 
開發者ID:A-Miracle,項目名稱:QiangHongBao,代碼行數:8,代碼來源:AccessibilityUtils.java

示例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();
}
 
開發者ID:Sl0v3C,項目名稱:Android_AutoSignInTool,代碼行數:39,代碼來源:autoSignInJDF.java

示例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);
}
 
開發者ID:kaixuanluo,項目名稱:pc-android-controller-android,代碼行數:16,代碼來源:AccessUtil.java

示例8: performBack

import android.accessibilityservice.AccessibilityService; //導入方法依賴的package包/類
/** 返回事件*/
public static void performBack(AccessibilityService service) {
    if(service == null) {
        return;
    }
    service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_BACK);
}
 
開發者ID:A-Miracle,項目名稱:QiangHongBao,代碼行數:8,代碼來源:AccessibilityUtils.java

示例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);
    }
}
 
開發者ID:xmlxin,項目名稱:ReplyMessage,代碼行數:14,代碼來源:PerformClickUtils.java

示例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);
}
 
開發者ID:brute121105,項目名稱:weixin_auto,代碼行數:8,代碼來源:AutoUtil.java

示例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);
	}
}
 
開發者ID:tianzhijiexian,項目名稱:Float-Bar,代碼行數:13,代碼來源:Util.java

示例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);
	}
}
 
開發者ID:tianzhijiexian,項目名稱:Float-Bar,代碼行數:13,代碼來源:Util.java

示例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();
}
 
開發者ID:Sl0v3C,項目名稱:Android_AutoSignInTool,代碼行數:43,代碼來源:autoSignInJD.java

示例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);
    }
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:9,代碼來源:AceHelper.java

示例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);
    }
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:9,代碼來源:AceHelper.java


注:本文中的android.accessibilityservice.AccessibilityService.performGlobalAction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。