java.lang.IllegalStateException: Not on the main thread Google Maps
you must run this code in the UIThread:
activity.runOnUIThread(new Runnable(){
public void run(){
mGoogleMap.addPolyline(new PolylineOptions().add(latLng));
mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(new CameraPosition.Builder().target(latLng)
.zoom(13).build()));
}
});