title: What is the difference between queryIntentActivities() and resolveActivity().Which one is the best approach to know about existing apps for a intent?
body: <p>As I can see in Android documentation when trying to build implicit intents when sending the user to another app. These are the two approaches to avoid ActivityNotFoundException.</p>
  
  <p>First one :</p>
  
  <pre><code>Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
  
  PackageManager packageManager = getPackageManager();
  List&lt;ResolveInfo&gt; activities = packageManager.queryIntentActivities(intent,
      PackageManager.MATCH_DEFAULT_ONLY);
  boolean isIntentSafe = activities.size() &gt; 0;
  </code></pre>
  
  <p>Second one :</p>
  
  <pre><code>Intent chooser = Intent.createChooser(intent, title);
  if (intent.resolveActivity(getPackageManager()) != null) {
  
  }
  </code></pre>
  
  <p>Now my doubt is whats the differnece and which one should i use ?</p>