code: public static boolean isLauncherActivity(Intent intent) {
          if (intent == null)
              return false;
  
          if (StringUtils.isNullOrEmpty(intent.getAction())) {
              return false;
          }
  
          if (intent.getCategories() == null)
              return false;
  
          return Intent.ACTION_MAIN.equals(intent.getAction())
                  && intent.getCategories().contains(Intent.CATEGORY_LAUNCHER);
      }
docs: check whether is launcher or not.
  
  @param intent
  @return