Code example for AccessibilityEvent

Methods: getClassName, getPackageName

0
            } 
        } 
    } 
 
    private boolean checkPackage(AccessibilityEvent event){
        String cls = event.getClassName().toString();
        String pkg = event.getPackageName().toString();
 
        Log.d(TAG, "cls = " + cls + "," + "pkg = " + pkg);
 
        //テスト用にGmailを監視 
        if(pkg.equalsIgnoreCase("com.google.android.gm")){
            return true; 
        } 
 
        return false; 
    } 
 
    @Override 
    public void onInterrupt() { 
    }