Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1.     public static String getLatLng(Context context, Location currentLocation) {
  2.         // If the location is valid
  3.         if (currentLocation != null) {
  4.  
  5.             // Return the latitude and longitude as strings
  6.             return context.getString(
  7.                     R.string.latitude_longitude,
  8.                     currentLocation.getLatitude(),
  9.                     currentLocation.getLongitude());
  10.         } else {
  11.  
  12.             // Otherwise, return the empty string
  13.             return EMPTY_STRING;
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement