Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.location.Criteria;
import android.location.LocationManager;

public class Main {
    public static String getBestProvider(LocationManager locationManager) throws IllegalArgumentException {
        Criteria criteria = new Criteria();
        criteria.setAccuracy(Criteria.ACCURACY_FINE);
        criteria.setPowerRequirement(Criteria.NO_REQUIREMENT);

        return locationManager.getBestProvider(criteria, true);
    }
}