title: Google Maps intent returning error: No Activity found to handle Intent
body: <p>I have a <code>navigate</code> method:</p>
  
  <pre><code>    public void navigate(String coordinates){
  
          Uri intentUri = Uri.parse("geo"+coordinates);
          Intent mapIntent = new Intent(Intent.ACTION_VIEW);
          mapIntent.setData(intentUri);
          mapIntent.setPackage("com.google.android.apps.maps");
          getContext().startActivity(mapIntent);
      }
  </code></pre>
  
  <p>which is called when I click on a <code>TextView</code>:</p>
  
  <pre><code>        TextView location = (TextView) listItemView.findViewById(R.id.location);
          location.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  navigate(currentAttraction.getLocation());
              }
          });
  </code></pre>
  
  <p>However, when the app is running and I click on the <code>TextView</code>, the app <code>crashes and I get this error</code>:</p>
  
  <pre><code>2020-01-15 21:29:20.164 17438-17438/com.example.android.explorecapetown E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.android.explorecapetown, PID: 17438
      android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=geo-33.920864,18.418210 pkg=com.google.android.apps.maps }
          at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2051)
          at android.app.Instrumentation.execStartActivity(Instrumentation.java:1709)
          at android.app.Activity.startActivityForResult(Activity.java:5192)
          at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
          at android.app.Activity.startActivityForResult(Activity.java:5150)
          at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)
          at android.app.Activity.startActivity(Activity.java:5521)
          at android.app.Activity.startActivity(Activity.java:5489)
          at com.example.android.explorecapetown.AttractionAdapter.navigate(AttractionAdapter.java:72)
          at com.example.android.explorecapetown.AttractionAdapter$1.onClick(AttractionAdapter.java:46)
          at android.view.View.performClick(View.java:7125)
          at android.view.View.performClickInternal(View.java:7102)
          at android.view.View.access$3500(View.java:801)
          at android.view.View$PerformClick.run(View.java:27336)
          at android.os.Handler.handleCallback(Handler.java:883)
          at android.os.Handler.dispatchMessage(Handler.java:100)
          at android.os.Looper.loop(Looper.java:214)
          at android.app.ActivityThread.main(ActivityThread.java:7356)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  </code></pre>
  
  <p>The device does have Google Maps.</p>
  
  <p>I am very new to using a Maps intent so I was hoping someone could give me an idea of what I'm doing wrong.</p>
  
  <p><strong>P.S.</strong></p>
  
  <p>Take note this occurs within an Adapter class:</p>
  
  <pre><code>public class AttractionAdapter extends ArrayAdapter&lt;Attraction&gt; {
  
  
      public AttractionAdapter(Context context, ArrayList&lt;Attraction&gt; attractions) {
          super(context, 0, attractions);
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View listItemView = convertView;
          if (listItemView == null) {
              listItemView = LayoutInflater.from(getContext()).inflate(
                      R.layout.list_item, parent, false);
          }
  
          final Attraction currentAttraction = getItem(position);
  
          ImageView imageView = (ImageView) listItemView.findViewById(R.id.attraction_image);
          imageView.setImageResource(currentAttraction.getImageResourceId());
  
          TextView attractionName = (TextView) listItemView.findViewById(R.id.attraction_name);
          attractionName.setText(currentAttraction.getName());
  
          TextView location = (TextView) listItemView.findViewById(R.id.location);
          location.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  navigate(currentAttraction.getLocation());
              }
          });
  
          // Find the ImageView in the list_item.xml layout with the ID image.
          TextView contact = (TextView) listItemView.findViewById(R.id.contact);
          // Check if an image is provided for this word or not
          if (currentAttraction.hasContact()) {
              // If an image is available, display the provided image based on the resource ID
              contact.setText(currentAttraction.getContact());
              // Make sure the view is visible
              contact.setVisibility(View.VISIBLE);
          } else {
              // Otherwise hide the ImageView (set visibility to GONE)
              contact.setVisibility(View.GONE);
          }
  
          return listItemView;
      }
  
      public void navigate(String coordinates){
  
          Uri intentUri = Uri.parse("geo"+coordinates);
          Intent mapIntent = new Intent(Intent.ACTION_VIEW);
          mapIntent.setData(intentUri);
          mapIntent.setPackage("com.google.android.apps.maps");
          getContext().startActivity(mapIntent);
      }
  }
  </code></pre>