public class Meridian
extends java.lang.Object
Meridian SDK configuration class. This class’s static configure method must be called to initialize the SDK.
By using the Meridian SDK, you hereby agree to the terms of the Meridian SDK License at https://edit.meridianapps.com/users/sdk_tac
| Modifier and Type | Class and Description |
|---|---|
static class |
Meridian.DomainRegion |
static class |
Meridian.MeridianConfigurationException
Exception that indicates when there has been a configuration error when initializing the Meridian SDK.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
appMakerEnabled()
Get if appmaker is enabled (SUB1-APPMAKER).
|
boolean |
campaignsEnabled()
Get if campaigns should be shown (SUB1-CAMPAIGNS).
|
static void |
configure(android.content.Context context)
Configure Meridian instance, this can only be run once.
|
android.net.Uri |
getAPIBaseUri()
Get the base uri for the sdk’s api calls
|
java.lang.String |
getAPIVersion()
Get the version of the Meridian API utilized by the SDK.
|
long |
getCacheOverrideTimeout()
Get the timeout in milliseconds to use when overriding cache headers provided by the server.
|
MapInfo.ZoomLevel |
getDefaultMaxMapZoom()
Get the default max map zoom.
|
java.lang.String |
getEditorToken()
Get the stored Meridian Editor token.
|
java.lang.String |
getLocationSharingToken()
Get the stored location sharing token.
|
int |
getOrientationWarningDelay()
Get the delay (in milliseconds) before the orientation warning is set/cleared.
|
int |
getOrientationWarningThreshold()
Get the degree threshold from the routing line that triggers a warning.
|
android.content.pm.PackageInfo |
getPackageInfo()
Get the PackageInfo for this application.
|
LevelPickerControl.PickerStyle |
getPickerStyle() |
com.android.volley.RequestQueue |
getRequestQueue()
Get the request queue used by all Meridian API calls.
|
long |
getRerouteDelay()
Get the delay before rerouting is triggered.
|
long |
getRerouteDistance()
Get the distance threshold in meters for rerouting.
|
long |
getRouteSnapDistance()
Get the snap threshold in meters for snapping generated locations to the route line while routing.
|
java.lang.String |
getSDKVersion()
Get the version of the Meridian SDK
|
int |
getSDKVersionCode()
Get the version code of the Meridian SDK
|
static Meridian |
getShared() |
float |
getSystemLocationAccuracyThreshold()
When using system-provided services for outdoor location, readings will only be considered valid with an accuracy of at least this value in meters.
|
android.net.Uri |
getTagsBaseUri() |
void |
initGoalsForLocation(EditorKey appKey) |
void |
setAPIBaseUri(android.net.Uri baseUri) |
void |
setAutoAdvanceRoutes(boolean autoAdvance)
Enable/Disable auto advancing steps using location information during routing.
|
void |
setCacheOverrideTimeout(long timeOut)
Set the timeout in milliseconds to use when overriding cache headers provided by the server.
|
void |
setDefaultMaxMapZoom(MapInfo.ZoomLevel defaultMaxMapZoom)
Set the default max map zoom.
|
void |
setDomainRegion(Meridian.DomainRegion region)
Set the Domain Region to either EU/US.
|
void |
setEditorToken(java.lang.String editorToken)
Set the Meridian Editor token.
|
void |
setForceSimulatedLocation(boolean forceSimulatedLocation)
Enable/Disable forcing the use of the simulated location from the server rather than generated locations.
|
void |
setOrientationWarningDelay(int milliseconds)
When the compass is poorly aligned to the routing line, a warning is displayed after a certain amount of time.
|
void |
setOrientationWarningThreshold(int degrees)
The compass orientation is considered correct when it’s aligned to the routing line.
|
void |
setOverrideCacheHeaders(boolean override)
Set the SDK to override the server provided cache headers with the cache override timeout.
|
void |
setPickerStyle(LevelPickerControl.PickerStyle pickerStyle) |
void |
setRerouteDelay(long rerouteDelay)
Set the delay before rerouting is triggered.
|
void |
setRerouteDistance(long rerouteDistance)
Set the distance threshold for rerouting.
|
void |
setRouteSnapDistance(long defaultSnapDistance)
Set the snap threshold in meters for snapping generated locations to the route line while routing.
|
void |
setShowCompass(boolean showCompass)
Enable/Disable the visibility of the compass arrow on the blue dot.
|
void |
setShowTags(boolean showTags) |
void |
setSystemLocationAccuracyThreshold(float systemLocationAccuracyThreshold)
Set the system-provided services accuracy threshold.
|
void |
setTagsBaseUri(android.net.Uri tagsBaseUri) |
void |
setUseAnalytics(boolean useAnalytics)
Enable/Disable the use of Meridian analytics reporting (requires play-services-analytics:7.5.0 or higher).
|
boolean |
shouldAutoAdvanceRoutes()
Indicates if the SDK will auto advance routes when a devices location moves along them.
|
boolean |
shouldForceSimulatedLocation()
Indicates if the SDK will force the use of the simulated location from the server rather than generated locations.
|
boolean |
shouldOverrideCacheHeaders()
Indicates if the Cache headers of cache-able API requests are being overridden by the cache override timeout.
|
boolean |
shouldUseAnalytics()
Indicates if the SDK will use analytics reporting (requires play-services-analytics:7.5.0 or higher)
|
boolean |
showBlueDot()
Get if blue dot should be shown (SUB1-BLUE-100).
|
boolean |
showCompass()
Indicates if the SDK will show the compass arrow on the blue dot.
|
boolean |
showMaps()
Get if maps should be shown (SUB1-MAPS-100).
|
boolean |
showTags()
Get if Tags should be shown (SUB1-TAGS-100).
|
public static Meridian getShared()
public static void configure(@NonNull
android.content.Context context)
Configure Meridian instance, this can only be run once.
Meridian.MeridianConfigurationException - if invalid context or already initializedpublic void initGoalsForLocation(EditorKey appKey)
public java.lang.String getSDKVersion()
Get the version of the Meridian SDK
public int getSDKVersionCode()
Get the version code of the Meridian SDK
public java.lang.String getAPIVersion()
Get the version of the Meridian API utilized by the SDK.
public java.lang.String getEditorToken()
Get the stored Meridian Editor token.
public void setEditorToken(java.lang.String editorToken)
Set the Meridian Editor token.
public java.lang.String getLocationSharingToken()
Get the stored location sharing token.
public com.android.volley.RequestQueue getRequestQueue()
Get the request queue used by all Meridian API calls.
public android.content.pm.PackageInfo getPackageInfo()
Get the PackageInfo for this application.
public android.net.Uri getAPIBaseUri()
Get the base uri for the sdk’s api calls
public void setAPIBaseUri(android.net.Uri baseUri)
public android.net.Uri getTagsBaseUri()
public void setTagsBaseUri(android.net.Uri tagsBaseUri)
public void setDomainRegion(Meridian.DomainRegion region)
Set the Domain Region to either EU/US. Primarily a convenience method for initialization using the SDK
public boolean shouldOverrideCacheHeaders()
Indicates if the Cache headers of cache-able API requests are being overridden by the cache override timeout.
public void setOverrideCacheHeaders(boolean override)
Set the SDK to override the server provided cache headers with the cache override timeout.
public long getCacheOverrideTimeout()
Get the timeout in milliseconds to use when overriding cache headers provided by the server.
public void setCacheOverrideTimeout(long timeOut)
Set the timeout in milliseconds to use when overriding cache headers provided by the server.
public boolean shouldAutoAdvanceRoutes()
Indicates if the SDK will auto advance routes when a devices location moves along them.
public void setAutoAdvanceRoutes(boolean autoAdvance)
Enable/Disable auto advancing steps using location information during routing.
public boolean shouldForceSimulatedLocation()
Indicates if the SDK will force the use of the simulated location from the server rather than generated locations.
public void setForceSimulatedLocation(boolean forceSimulatedLocation)
Enable/Disable forcing the use of the simulated location from the server rather than generated locations.
public void setPickerStyle(LevelPickerControl.PickerStyle pickerStyle)
public LevelPickerControl.PickerStyle getPickerStyle()
public boolean shouldUseAnalytics()
Indicates if the SDK will use analytics reporting (requires play-services-analytics:7.5.0 or higher)
public void setUseAnalytics(boolean useAnalytics)
Enable/Disable the use of Meridian analytics reporting (requires play-services-analytics:7.5.0 or higher).
public boolean showCompass()
Indicates if the SDK will show the compass arrow on the blue dot.
public void setShowCompass(boolean showCompass)
Enable/Disable the visibility of the compass arrow on the blue dot.
public MapInfo.ZoomLevel getDefaultMaxMapZoom()
Get the default max map zoom.
public void setDefaultMaxMapZoom(MapInfo.ZoomLevel defaultMaxMapZoom)
Set the default max map zoom.
public long getRouteSnapDistance()
Get the snap threshold in meters for snapping generated locations to the route line while routing.
public void setRouteSnapDistance(long defaultSnapDistance)
Set the snap threshold in meters for snapping generated locations to the route line while routing.
public long getRerouteDistance()
Get the distance threshold in meters for rerouting.
public void setRerouteDistance(long rerouteDistance)
Set the distance threshold for rerouting.
public long getRerouteDelay()
Get the delay before rerouting is triggered.
public void setRerouteDelay(long rerouteDelay)
Set the delay before rerouting is triggered.
public int getOrientationWarningThreshold()
Get the degree threshold from the routing line that triggers a warning.
public void setOrientationWarningThreshold(int degrees)
The compass orientation is considered correct when it’s aligned to the routing line. When the compass is poorly aligned to the routing line, a warning is displayed. Sets the threshold in degrees at which a poor compass alignment triggers a warning. Acceptable range is 45 to 90 degrees.
degrees - degree threshold at which the compass is considered poorly aligned.public int getOrientationWarningDelay()
Get the delay (in milliseconds) before the orientation warning is set/cleared.
public void setOrientationWarningDelay(int milliseconds)
When the compass is poorly aligned to the routing line, a warning is displayed after a certain amount of time. Sets the delay before the warning is set or cleared. Acceptable delay is 2000 to 10,000 milliseconds.
milliseconds - time before the orientation warning is set or removed (in milliseconds)public float getSystemLocationAccuracyThreshold()
When using system-provided services for outdoor location, readings will only be considered valid with an accuracy of at least this value in meters.
public void setSystemLocationAccuracyThreshold(float systemLocationAccuracyThreshold)
Set the system-provided services accuracy threshold. Defaults to 5.
public boolean showMaps()
Get if maps should be shown (SUB1-MAPS-100).
public boolean showBlueDot()
Get if blue dot should be shown (SUB1-BLUE-100).
public boolean showTags()
Get if Tags should be shown (SUB1-TAGS-100).
public void setShowTags(boolean showTags)
public boolean campaignsEnabled()
Get if campaigns should be shown (SUB1-CAMPAIGNS).
public boolean appMakerEnabled()
Get if appmaker is enabled (SUB1-APPMAKER).