Skip to content

Instantly share code, notes, and snippets.

@kkashyap1707
Created July 30, 2016 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkashyap1707/3658256d4c673bb7ae0daa5ba81527d7 to your computer and use it in GitHub Desktop.
Save kkashyap1707/3658256d4c673bb7ae0daa5ba81527d7 to your computer and use it in GitHub Desktop.
public static void keyBoardEvent(int eventNumber)
{
try
{
Runtime.getRuntime().exec("cmd /C adb shell input keyevent " + eventNumber);
Thread.sleep(3000);
}
catch (Throwable t)
{
t.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment