title: Create a circuit route by passing waypoints to GoogleMaps android
body: <p>I am working on functionality where I send <code>waypoints</code> to <code>Gmaps</code>app through <code>Intent</code> so that use can navigate to the destination by the custom <code>waypoints</code> that I send</p>
  
  <p>I when I plot this route in my embedded <code>Google Maps</code> , I can see <code>Circuit route</code> , but when I see the same route in <code>Gmaps</code>app , the <code>Circuit</code> is broken.</p>
  
  <p><strong>My code :</strong></p>
  
  <pre><code>String srcAdd = "saddr="+latLngArrayList.get(0).latitude+","+latLngArrayList.get(0).longitude;
          String desAdd = "&amp;daddr="+latLngArrayList.get(latLngArrayList.size() - 1).latitude+","+latLngArrayList.get(latLngArrayList.size() - 1).longitude;
          String wayPoints = "";
  
          for (int j = 1; j &lt; latLngArrayList.size() - 1; ++j) {
  
              wayPoints =wayPoints+"+to:"+latLngArrayList.get(j).latitude+","+latLngArrayList.get(j).longitude;
          }
  
          String link="https://maps.google.com/maps?"+srcAdd+desAdd+wayPoints;
          final Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(link));
          intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
          startActivity(intent);
  </code></pre>
  
  <p><strong>circuit route</strong>
  <a href="https://i.stack.imgur.com/nE9hB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nE9hB.png" alt="enter image description here"></a></p>
  
  <p><strong>no circuit route</strong>
  <a href="https://i.stack.imgur.com/ZVhPz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZVhPz.png" alt="enter image description here"></a></p>