public class POBLocationDetector
extends java.lang.Object
implements android.location.LocationListener
| Constructor and Description |
|---|
POBLocationDetector(android.content.Context appContext)
Constructs POBLocationDetector by initializing app context
|
| Modifier and Type | Method and Description |
|---|---|
android.location.Address |
getAddress()
Given a
Location, return a country code. |
java.lang.String |
getISOAlpha2CountryCode()
Given a
Location, return a country code. |
android.location.Location |
getLocation()
Method is used to get location on the basic of LocationProvider(GPS, Network)
|
void |
onLocationChanged(android.location.Location location) |
void |
onProviderDisabled(java.lang.String provider) |
void |
onProviderEnabled(java.lang.String provider) |
void |
onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras) |
void |
setLocationUpdateIntervalInMs(long locationUpdateIntervalInMs)
Method to set update time interval
|
public POBLocationDetector(@NonNull
android.content.Context appContext)
appContext - instance of application contextpublic void setLocationUpdateIntervalInMs(long locationUpdateIntervalInMs)
locationUpdateIntervalInMs - time interval to get location@Nullable public android.location.Location getLocation()
@Nullable public android.location.Address getAddress()
Location, return a country code.@Nullable public java.lang.String getISOAlpha2CountryCode()
Location, return a country code.public void onLocationChanged(@NonNull
android.location.Location location)
onLocationChanged in interface android.location.LocationListenerpublic void onStatusChanged(java.lang.String provider,
int status,
android.os.Bundle extras)
onStatusChanged in interface android.location.LocationListenerpublic void onProviderEnabled(@NonNull
java.lang.String provider)
onProviderEnabled in interface android.location.LocationListenerpublic void onProviderDisabled(@NonNull
java.lang.String provider)
onProviderDisabled in interface android.location.LocationListener