I need this code to be ran until it works,
LatLng current_pos = new LatLng(location.getLatitude(), location.getLongitude());
cp.SetCoordsCurrent(current_pos);
I noticed if signal is good it works fine but if signal is weak then app crashes or throws exception (with try and catch). How can I run this code until it gets coordinates? Also I need to display progressbar while it's trying to fix.