Code example for Instrumentation

Methods: sendKeyDownUpSync

0
        sendKey(KeyEvent.KEYCODE_DPAD_DOWN);
    } 
 
    private void sendKey(int key) {
        try { 
            instrumentation.sendKeyDownUpSync(key);
        } catch (SecurityException ignored) {
        } 
    } 
 
    private Solo solo() { 
        return TestRunInformation.getSolo(); 
    } 
 
}