Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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());
    }
}