code: public static boolean hasActivity(Context context, Intent intent) {
          return context.getPackageManager().resolveActivity(intent, MATCH_DEFAULT_ONLY) != null;
      }
docs: True if the Intent can be resolved to an Activity.