List of utility methods to do Activity Home Get
void | goHome(Activity ctx) go Home Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
intent.addCategory(Intent.CATEGORY_HOME);
ctx.startActivity(intent);
ctx.overridePendingTransition(0, 0);
|
void | goHome2(Activity ctx) go Home PackageManager packageManager = ctx.getPackageManager(); Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); List<ResolveInfo> resolveInfos = packageManager .queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); String myPackageName = ctx.getPackageName(); for (ResolveInfo ri : resolveInfos) { ... |
Activity | getHostActivity() get Host Activity return (currHostActivity.get());
|