Input a String via Instrumentation. - Android android.app

Android examples for android.app:Instrumentation

Description

Input a String via Instrumentation.

Demo Code

// Copyright 2012 The Chromium Authors. All rights reserved.
//package com.java2s;
import android.app.Instrumentation;

public class Main {
    /**/*w  w w  .  j  a  v  a 2 s  . c  o  m*/
     * Input a String.
     */
    public static void inputString(Instrumentation instrumentation,
            String text) {
        instrumentation.sendStringSync(text);
        instrumentation.waitForIdleSync();
    }
}

Related Tutorials