Controls the behavior of ETA/directions unit.
More...
#include <IDirectionsManager.h>
|
| virtual | ~ICommon () |
| | Destructor is protected to deny explicit object deallocation. More...
|
| |
Controls the behavior of ETA/directions unit.
The functionality exposed by IDirectionsManager is enabled only when platform is responsible for calculting directions (GC::ETA_MODE_INTERNAL mode is set through IGlympse::setEtaMode()).
| virtual void Glympse::IDirectionsManager::enableActivityRecognition |
( |
bool |
enable) | |
|
|
pure virtual |
Enables automatic device activity recognition.
The feature is disabled by default.
Supported platforms:
- iOS 7.0+
- Android 2.3+ with Google Play Services 4.x+
- Note
- This method does not trigger directions to be recalculated instantaneously. It only affects the behavior of activity recognition unit, which can in turn stimulate route update.
-
Activity recognition remains enabled only for the duration of sharing.
- Parameters
-
| enable | Flag indicating whether activity recognition should be enabled. |
| virtual int32 Glympse::IDirectionsManager::getDeviceActivity |
( |
) | |
|
|
pure virtual |
Gets the most recently recognized device activity.
- Returns
- Current device activity, which will be one of the CC::ACTIVITY_* constants.
| virtual int32 Glympse::IDirectionsManager::getEtaQueryMode |
( |
) | |
|
|
pure virtual |
Gets the currently set eta/route query mode.
- Returns
- Eta/route query mode, which will be one of the GC::ETA_QUERY_MODE_* constants.
| virtual int32 Glympse::IDirectionsManager::getTravelMode |
( |
) | |
|
|
pure virtual |
Gets the most recently applied travel mode.
- Returns
- Travel mode, which will be one of the GC::TRAVEL_MODE_* constants.
| virtual bool Glympse::IDirectionsManager::isActivityRecognitionEnabled |
( |
) | |
|
|
pure virtual |
- Returns
- true if automatic activity recognition is enabled.
| virtual bool Glympse::IDirectionsManager::isDeviceStationary |
( |
) | |
|
|
pure virtual |
Determines if device is stationary.
Activity recognition must be enabled.
- Returns
- true if device is being held still.
| virtual GDirections Glympse::IDirectionsManager::queryDirections |
( |
const GLatLng & |
origin, |
|
|
const GLatLng & |
destination, |
|
|
int32 |
travelMode |
|
) |
| |
|
pure virtual |
Initiates a request for directions.
A listener should be set on the returned Directions object to listen for the response.
- Parameters
-
| origin | Starting point for directions. |
| destination | Ending point for directions. |
| travelMode | Travel Mode to be used for the directions. See GC::TRAVEL_MODE_* |
- Returns
- Directions object with results. Set a listener on value to determine when results are ready. If the returned value is NULL, then there was an issue with the parameters and the query was not performed.
| virtual void Glympse::IDirectionsManager::setEtaQueryMode |
( |
int32 |
mode) | |
|
|
pure virtual |
Determines when etas and routes should be queried for outgoing tickets.
- Parameters
-
| mode | Desired query mode, one of the GC::ETA_QUERY_MODE_* constants. |
| virtual void Glympse::IDirectionsManager::setTravelMode |
( |
int32 |
mode) | |
|
|
pure virtual |
Overrides currently applied travel mode.
The mode can only be overridden if all of the following criteria are met:
The following travel modes are supported by this method:
- Note
- Calling this method causes routes to all destinations to be recalculated for all active tickets.
- Parameters
-
| mode | Travel mode to be used for querying directions. |
The documentation for this struct was generated from the following file: