title: Get list of all social media application installed in phone?
body: <p>I am developing an application which lists all application installed in users mobile. I retrieved all applications and I listed it in <strong>RecyclerView</strong>. Now I want to separate Social Media applications from that list for some other purposes. Is there any way to separate Social Media Apps ? 
  I am using below code to retrieve all apps package names from phone.</p>
  
  <pre><code>public List&lt;String&gt; GetAllInstalledApkInfo(){
  
      List&lt;String&gt; ApkPackageName = new ArrayList&lt;&gt;();
  
      Intent intent = new Intent(Intent.ACTION_MAIN,null);
  
      intent.addCategory(Intent.CATEGORY_LAUNCHER);
  
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED );
  
      List&lt;ResolveInfo&gt; resolveInfoList = context1.getPackageManager().queryIntentActivities(intent,0);
  
      for(ResolveInfo resolveInfo : resolveInfoList){
  
          ActivityInfo activityInfo = resolveInfo.activityInfo;
  
          ApkPackageName.add(activityInfo.applicationInfo.packageName);
      }
  
      return ApkPackageName;
  
  }
  </code></pre>