code: public static boolean launchAppForPackage(final Context context, final String packageName) {
          try {
              final PackageManager packageManager = context.getPackageManager();
              final Intent intent = packageManager.getLaunchIntentForPackage(packageName);
              intent.addCategory(Intent.CATEGORY_LAUNCHER);
              context.startActivity(intent);
              return true;
          } catch (Exception ex) {
              Log.e("Caffeine", "Failed to launch application for package name [" + packageName + "]", ex);
              return false;
          }
      }
docs: Tries to launch the application for a given package name.
  @return true if launch succeeded, otherwise false.