public class GoIndoor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GoIndoor.Builder
Builder class for GoIndoor.
|
static interface |
GoIndoor.LocationAlgorithm
Annotation defining the possible algorithms to be used
|
static interface |
GoIndoor.UpdatePolicy
Annotation defining the database update policy
|
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LOCATION_REFRESH
Variable defining the default location update rate in msec
|
static int |
LOCATION_TYPE_AVERAGE
Weighted average
|
static int |
LOCATION_TYPE_CLOSEST
Closest Beacon
|
static int |
LOCATION_TYPE_PROJECT
Weighted average with projection to the closest edge
|
static int |
UPDATE_MOBILE
Update only over Mobile data connection
|
static int |
UPDATE_NO
Updates are disabled
|
static int |
UPDATE_WIFI
Update only over Wifi
|
Modifier and Type | Method and Description |
---|---|
Route |
computeRoute(RoutePoint start,
RoutePoint destination)
This method computes a route between two given points.
|
void |
disconnect()
This method will disconnect the location provider and closes the session to the server.
|
java.util.ArrayList<Asset> |
getAssets()
Getter for the asset list.
|
java.util.ArrayList<Asset> |
getAssets(java.util.ArrayList<java.lang.String> ids)
Getter for the asset list.
|
java.util.ArrayList<Asset> |
getAssets(java.lang.String id)
Getter for the asset list.
|
java.util.ArrayList<Beacon> |
getBeacons()
Getter for the beacon list.
|
java.util.ArrayList<Beacon> |
getBeacons(java.util.ArrayList<java.lang.String> ids)
Getter for the beacon list.
|
java.util.ArrayList<Beacon> |
getBeacons(java.lang.String id)
Getter for the beacon list.
|
java.util.ArrayList<Building> |
getBuildings()
Getter for the building list.
|
java.util.ArrayList<Building> |
getBuildings(java.util.ArrayList<java.lang.String> ids)
Getter for the building list.
|
Building |
getBuildings(java.lang.String id)
Getter for a building.
|
Logger |
getLogger()
Getter for the logger object.
|
java.util.ArrayList<Notification> |
getNotifications()
Getter for the notification list.
|
java.util.ArrayList<Notification> |
getNotifications(java.util.ArrayList<java.lang.String> ids)
Getter for the notification list.
|
java.util.ArrayList<Notification> |
getNotifications(java.lang.String id)
Getter for the notification list.
|
Place |
getPlace(java.lang.String id)
Getter for a place.
|
java.util.ArrayList<Place> |
getPlaces()
Getter for the place list.
|
java.util.ArrayList<Place> |
getPlaces(java.util.ArrayList<java.lang.String> ids)
Getter for the places list.
|
java.util.ArrayList<Place> |
getPlaces(double latitude,
double longitude,
int radius,
int floorNumber,
java.lang.String building,
java.util.ArrayList<java.lang.String> tags,
java.util.HashMap<java.lang.String,java.lang.String> filter)
Getter for the place list.
|
java.util.ArrayList<Place> |
getPlaces(LocationResult loc,
int radius,
java.util.ArrayList<java.lang.String> tags,
java.util.HashMap<java.lang.String,java.lang.String> filter)
Getter for places inside a defined area.
|
java.util.ArrayList<Place> |
getPlaces(java.lang.String id)
Getter for the place list.
|
java.util.ArrayList<Place> |
getPlaces(java.lang.String id,
java.util.ArrayList<java.lang.String> tags,
java.util.HashMap<java.lang.String,java.lang.String> filter)
Getter for the place list.
|
Settings |
getSettings()
Getter for the settings.
|
UserProfile |
getUserProfile()
Getter for the user profile.
|
void |
setLocationType(int type)
Sets the positioning type.
|
void |
setMinDistanceUpdate(double distanceUpdate)
Sets the minimum distance that should change the location result to be updated.
|
void |
setScanForced(boolean scanForced)
Beta feature
In order to palliate the Android bug 65863, this method will force the beacons scan to be
enabled for at least 700ms and disabled at least 300ms.
|
void |
setScanForced(boolean scanForced,
long enabled,
long disabled)
Beta feature
In order to palliate the Android bug 65863, this method will force the beacons scan to be
enabled for at least 700ms and disabled at least 300ms.
|
void |
setUpdatePolicy(int policy)
Sets the update policy.
|
void |
startLocate(LocationBroadcast br)
Method to start the indoor location.
|
void |
stopLocate()
Method to stop the indoor location
|
void |
triggerUpdate()
Triggers an immediate update to the database.
|
public static final long DEFAULT_LOCATION_REFRESH
public static final int LOCATION_TYPE_AVERAGE
public static final int LOCATION_TYPE_CLOSEST
public static final int LOCATION_TYPE_PROJECT
public static final int UPDATE_NO
public static final int UPDATE_WIFI
public static final int UPDATE_MOBILE
public void disconnect()
public void startLocate(LocationBroadcast br)
br
- LocationBroadcast
to handle the output from the librarypublic void stopLocate()
public Route computeRoute(RoutePoint start, RoutePoint destination) throws java.lang.IllegalArgumentException
start
- Departure pointdestination
- Destination pointjava.lang.IllegalArgumentException
- If route between buildings is computed or there are no edgespublic Logger getLogger()
public java.util.ArrayList<Beacon> getBeacons()
public java.util.ArrayList<Beacon> getBeacons(java.lang.String id)
id
- Building or floor ID whose beacons need to be retrievedpublic java.util.ArrayList<Beacon> getBeacons(java.util.ArrayList<java.lang.String> ids)
ids
- Building or floor IDs whose beacons need to be retrievedpublic java.util.ArrayList<Building> getBuildings()
public Building getBuildings(java.lang.String id)
id
- Building ID to be retrievedpublic java.util.ArrayList<Building> getBuildings(java.util.ArrayList<java.lang.String> ids)
ids
- Building IDs to be retrievedpublic java.util.ArrayList<Asset> getAssets()
public java.util.ArrayList<Asset> getAssets(java.lang.String id)
id
- Building or floor ID whose assets need to be retrievedpublic java.util.ArrayList<Asset> getAssets(java.util.ArrayList<java.lang.String> ids)
ids
- Building or floor IDs whose assets need to be retrievedpublic Place getPlace(java.lang.String id)
public java.util.ArrayList<Place> getPlaces()
public java.util.ArrayList<Place> getPlaces(java.lang.String id)
id
- Building or floor ID whose places need to be retrievedpublic java.util.ArrayList<Place> getPlaces(java.util.ArrayList<java.lang.String> ids)
ids
- Building or floor IDs whose places need to be retrievedpublic java.util.ArrayList<Place> getPlaces(LocationResult loc, int radius, java.util.ArrayList<java.lang.String> tags, java.util.HashMap<java.lang.String,java.lang.String> filter)
loc
- Location whose places needs to be retrievedradius
- Radius from the location. If 0 it will returns the closest onetags
- List of POI tags that should match in the search, it can be nullfilter
- Map of POI properties that should match in the search, it can be nullpublic java.util.ArrayList<Place> getPlaces(java.lang.String id, java.util.ArrayList<java.lang.String> tags, java.util.HashMap<java.lang.String,java.lang.String> filter)
id
- Building or floor ID whose places need to be retrieved, it can be nulltags
- List of POI tags that should match in the search, it can be nullfilter
- Map of POI properties that should match in the search, it can be nullpublic java.util.ArrayList<Place> getPlaces(double latitude, double longitude, int radius, int floorNumber, java.lang.String building, java.util.ArrayList<java.lang.String> tags, java.util.HashMap<java.lang.String,java.lang.String> filter)
latitude
- WGS84 latitude whose places needs to be retrievedlongitude
- WGS84 longitude whose areas needs to be retrievedradius
- Radius from the location. If 0 it will returns the closest onefloorNumber
- Floor number whose places needs to be retrievedbuilding
- Building ID whose places needs to be retrievedtags
- List of POI tags that should match in the search, it can be nullfilter
- Map of POI properties that should match in the search, it can be nullpublic java.util.ArrayList<Notification> getNotifications()
public java.util.ArrayList<Notification> getNotifications(java.lang.String id)
id
- Building or floor ID whose notifications need to be retrievedpublic java.util.ArrayList<Notification> getNotifications(java.util.ArrayList<java.lang.String> ids)
ids
- Building or floor IDs whose notifications need to be retrievedpublic Settings getSettings()
public UserProfile getUserProfile()
public void setScanForced(boolean scanForced)
scanForced
- Flag to enable the forced scanpublic void setScanForced(boolean scanForced, long enabled, long disabled)
scanForced
- Flag to enable the forced scanenabled
- Beacon scanning time in msec. Shall be bigger than 700.disabled
- Beacon stop scanning time in msec. Shall be bigger than 300.public void setLocationType(int type)
type
- Location type to be appliedpublic void setMinDistanceUpdate(double distanceUpdate)
distanceUpdate
- Distance thresholdpublic void setUpdatePolicy(int policy)
policy
- Update policy to be appliedpublic void triggerUpdate()