public class Meridian extends 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(Context context)
Configure Meridian instance, this can only be run once.
|
Uri |
getAPIBaseUri()
Get the base uri for the sdk’s api calls
|
String |
getAPIVersion()
Get the version of the Meridian API utilized by the SDK.
|
int |
getBuildingsThreshold()
Returns the threshold for number of buildings to decide between the old vs.
|
long |
getCacheOverrideTimeout()
Get the timeout in milliseconds to use when overriding cache headers provided by the server.
|
Map<String,String> |
getCustomHttpHeaders()
Get custom headers for HTTP requests.
|
MapInfo.ZoomLevel |
getDefaultMaxMapZoom()
Get the default max map zoom.
|
String |
getEditorToken()
Get the stored Meridian Editor token.
|
String |
getLocationSharingToken()
Get the stored location sharing token.
|
int |
getLogLevel()
Get the logcat reporting level.
|
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.
|
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.
|
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.
|
Uri |
getTagsBaseUri() |
void |
setAPIBaseUri(Uri baseUri) |
void |
setAutoAdvanceRoutes(boolean autoAdvance)
Enable/Disable auto advancing steps using location information during routing.
|
void |
setBuildingsThreshold(int systemLocationAccuracyThreshold)
Set the number of buildings threshold.
|
void |
setCacheOverrideTimeout(long timeOut)
Set the timeout in milliseconds to use when overriding cache headers provided by the server.
|
void |
setCustomHttpHeaders(Map<String,String> httpHeaders)
Set custom headers to HTTP requests.
|
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(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 |
setLogLevel(int newLevel)
Set the logcat reporting level using android.util.Log values.
|
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)
Indicate if Tags should be shown.
|
void |
setShowUnpublishedMaps(boolean showUnpublishedMaps)
Enable/Disable if SDK APIs will also include maps that have not been marked published by the Editor.
|
void |
setSystemLocationAccuracyThreshold(float systemLocationAccuracyThreshold)
Set the system-provided services accuracy threshold.
|
void |
setTagsBaseUri(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).
|
boolean |
showUnpublishedMaps()
Indicates if SDK APIs will also include maps that have not been marked published by the Editor.
|
public static Meridian getShared()
public static void configure(@NonNull Context context)
Configure Meridian instance, this can only be run once.
Meridian.MeridianConfigurationException
- if invalid context or already initializedpublic String getSDKVersion()
Get the version of the Meridian SDK
public int getSDKVersionCode()
Get the version code of the Meridian SDK
public String getAPIVersion()
Get the version of the Meridian API utilized by the SDK.
public String getEditorToken()
Get the stored Meridian Editor token.
public void setEditorToken(String editorToken)
Set the Meridian Editor token.
public 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 PackageInfo getPackageInfo()
Get the PackageInfo for this application.
public Uri getAPIBaseUri()
Get the base uri for the sdk’s api calls
public void setAPIBaseUri(Uri baseUri)
public Uri getTagsBaseUri()
public void setTagsBaseUri(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 boolean showUnpublishedMaps()
Indicates if SDK APIs will also include maps that have not been marked published by the Editor.
public void setShowUnpublishedMaps(boolean showUnpublishedMaps)
Enable/Disable if SDK APIs will also include maps that have not been marked published by the Editor.
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 void setCustomHttpHeaders(Map<String,String> httpHeaders)
Set custom headers to HTTP requests. Reserved for Meridian use
httpHeaders
- headers to be addedpublic Map<String,String> getCustomHttpHeaders()
Get custom headers for HTTP requests.
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 10.
public int getBuildingsThreshold()
Returns the threshold for number of buildings to decide between the old vs. new level-picker UI
public void setBuildingsThreshold(int systemLocationAccuracyThreshold)
Set the number of buildings threshold. Defaults to 20.
public void setLogLevel(int newLevel)
Set the logcat reporting level using android.util.Log values. Defaults to android.util.Log.VERBOSE.
public int getLogLevel()
Get the logcat reporting level.
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)
Indicate if Tags should be shown.
public boolean campaignsEnabled()
Get if campaigns should be shown (SUB1-CAMPAIGNS).
public boolean appMakerEnabled()
Get if appmaker is enabled (SUB1-APPMAKER).