List of usage examples for android.accessibilityservice AccessibilityService getApplicationContext
@Override
public Context getApplicationContext()
From source file:Main.java
public static void gotoDeskTop(AccessibilityService service) { try {// w ww. j a v a 2s . c om Intent home = new Intent(Intent.ACTION_MAIN); home.addCategory(Intent.CATEGORY_HOME); home.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); service.getApplicationContext().startActivity(home); } catch (Exception e) { e.printStackTrace(); } }