Java tutorial
//package com.java2s; //License from project: Open Source License import android.location.Location; import java.util.Locale; public class Main { public static String dumpLocationInfo(Location loc) { if (loc == null) { return "Location null or empty"; } return String.format(Locale.getDefault(), "lat: %f, lng: %f, acc: %f, provider: %s", loc.getLatitude(), loc.getLongitude(), loc.getAccuracy(), loc.getProvider()); } }