yes, itβs very easy to show the direction if you have the latitude and longitude of both the source and destination. Just review the following code:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr="+latitude_source+","+longitude_source+"&daddr="+latitude_dest+","+longitude_dest)); startActivity(intent);
Where latitude_source=Latitude your source longitude_source=Longitude your source latitude_dest=Latitude your destination longitude_dest=Longitude your destination
Just replace these values ββwith your actual data. . Use the above code for a specific event.
Hope this helps you.
source share