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,
java.lang.String editorToken)
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.
|
int |
getBluedotComputationInterval()
Get the interval in seconds between bluedot computations.
|
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.
|
java.util.Map<java.lang.String,java.lang.String> |
getCustomHttpHeaders()
Get custom headers for HTTP requests.
|
MapInfo.ZoomLevel |
getDefaultMaxMapZoom()
Get the default max map zoom.
|
java.lang.String |
getEditorToken()
Get the stored Meridian Editor token.
|
java.lang.String |
getLocationSharingToken()
Deprecated.
|
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.
|
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() |
boolean |
isDarkThemeSupported() |
void |
setAPIBaseUri(android.net.Uri baseUri) |
void |
setAutoAdvanceRoutes(boolean autoAdvance)
Enable/Disable auto advancing steps using location information during routing.
|
void |
setBluedotComputationInterval(int intervalSeconds)
Set the interval in seconds between bluedot computations.
|
void |
setBuildingsThreshold(int buildingsThreshold)
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(java.util.Map<java.lang.String,java.lang.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(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 |
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 |
setRSSICorrection(boolean useRSSICorrection,
boolean override)
Enable/Disable if RSSI correction will be used.
|
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(android.net.Uri tagsBaseUri) |
void |
setUseAnalytics(boolean useAnalytics)
Enable/Disable the use of Meridian analytics reporting.
|
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.
|
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.
|
void |
supportDarkTheme(boolean supportDarkTheme)
Enables support for dark theme.
|
boolean |
useRSSICorrection()
Indicates if RSSI correction will be used.
|
public static Meridian getShared()
public static void configure(@NonNull android.content.Context context, @NonNull java.lang.String editorToken)
Configure Meridian instance, this can only be run once.
Meridian.MeridianConfigurationException
- if invalid context or already initializedpublic 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.
@Deprecated 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.
public void setUseAnalytics(boolean useAnalytics)
Enable/Disable the use of Meridian analytics reporting.
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 boolean useRSSICorrection()
Indicates if RSSI correction will be used. This adjusts the received signal strength based on hardware type.
public void setRSSICorrection(boolean useRSSICorrection, boolean override)
Enable/Disable if RSSI correction will be used. This adjusts the received signal strength based on hardware type.
useRSSICorrection
- If RSSI correction should be used.override
- If the server side value should be overridden - set true to force RSSI correction.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 int getBluedotComputationInterval()
Get the interval in seconds between bluedot computations.
public void setBluedotComputationInterval(int intervalSeconds)
Set the interval in seconds between bluedot computations. Minimum value is 2, the default value is 4.
public void setCustomHttpHeaders(java.util.Map<java.lang.String,java.lang.String> httpHeaders)
Set custom headers to HTTP requests. Reserved for Meridian use
httpHeaders
- headers to be addedpublic java.util.Map<java.lang.String,java.lang.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 buildingsThreshold)
Set the number of buildings threshold. Defaults to 20.
public boolean isDarkThemeSupported()
public void supportDarkTheme(boolean supportDarkTheme)
Enables support for dark theme. Note that dark theme is currently available on Android 10 and higher.
supportDarkTheme
- indicates if dark theme support should be enabled.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).