public class LocationUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
LATITUDE |
static double |
LONGITUDE |
| Constructor and Description |
|---|
LocationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static android.location.Location |
getLastLocation(android.content.Context context)
Method to save the com.example.library.tookan.mylibrary.location in preferences
|
static void |
init(android.content.Context context)
Method to initialize the Location
|
static boolean |
isGPSEnabled(android.content.Context context)
Method to check whether the GPS is enabled or not
|
static boolean |
isMockLocationsEnabled(android.content.Context context)
Method to check whether the mock locations are enabled
|
static boolean |
isNetworkEnabled(android.content.Context context)
Method to check whether com.example.library.tookan.mylibrary.location services via Network are enabled or not
|
static boolean |
isPlayServicesAvailable(android.app.Activity activity) |
static void |
saveLocation(android.content.Context context,
android.location.Location location)
Method to save the com.example.library.tookan.mylibrary.location in preferences
|
static android.location.Location |
toLocation(double latitude,
double longitude)
Method to build com.example.library.tookan.mylibrary.location from latitude and Longitude
|
static android.location.Location |
toLocation(LatLng locationLatLng)
Method to build com.example.library.tookan.mylibrary.location from latitude and Longitude
|
public static void init(android.content.Context context)
public static void saveLocation(android.content.Context context,
android.location.Location location)
location - public static boolean isMockLocationsEnabled(android.content.Context context)
public static boolean isGPSEnabled(android.content.Context context)
context - public static boolean isNetworkEnabled(android.content.Context context)
public static android.location.Location getLastLocation(android.content.Context context)
public static android.location.Location toLocation(double latitude,
double longitude)
latitude - longitude - public static android.location.Location toLocation(LatLng locationLatLng)
locationLatLng - public static boolean isPlayServicesAvailable(android.app.Activity activity)