Class Meridian

java.lang.Object
com.arubanetworks.meridian.Meridian

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

  • Method Details

    • getShared

      public static Meridian getShared()
    • configure

      public static void configure(@NonNull Context context, @NonNull String editorToken)
      Configure Meridian instance, this can only be run once.
      Throws:
      Meridian.MeridianConfigurationException - if invalid context or already initialized
    • getSDKVersion

      public String getSDKVersion()
      Get the version of the Meridian SDK
    • getSDKVersionCode

      public int getSDKVersionCode()
      Get the version code of the Meridian SDK
    • getSDKBuildDate

      public String getSDKBuildDate()
      Get the build date of the Meridian SDK
    • getAPIVersion

      public String getAPIVersion()
      Get the version of the Meridian API utilized by the SDK.
    • getEditorToken

      public String getEditorToken()
      Get the stored Meridian Editor token.
    • setEditorToken

      public void setEditorToken(String editorToken)
      Set the Meridian Editor token.
    • getRequestQueue

      public com.android.volley.RequestQueue getRequestQueue()
      Get the request queue used by all Meridian API calls.
    • getPackageInfo

      public PackageInfo getPackageInfo()
      Get the PackageInfo for this application.
    • getAPIBaseUri

      public Uri getAPIBaseUri()
      Get the base uri for the sdk’s api calls
    • setAPIBaseUri

      public void setAPIBaseUri(Uri baseUri)
      Internal API for using development version of the editor
    • getTagsBaseUri

      public Uri getTagsBaseUri()
    • setTagsBaseUri

      public void setTagsBaseUri(Uri tagsBaseUri)
      Internal API for using development version of the editor
    • getTagsBaseRestUri

      public Uri getTagsBaseRestUri()
    • setTagsBaseRestUri

      public void setTagsBaseRestUri(Uri tagsBaseRestUri)
      Internal API for using development version of the editor
    • setDomainRegion

      public void setDomainRegion(Meridian.DomainRegion region)
      Set the Domain Region to either EU/US.

      Primarily a convenience method for initialization using the SDK

    • shouldOverrideCacheHeaders

      public boolean shouldOverrideCacheHeaders()
      Indicates if the Cache headers of cache-able API requests are being overridden by the cache override timeout.
    • setOverrideCacheHeaders

      public void setOverrideCacheHeaders(boolean override)
      Set the SDK to override the server provided cache headers with the cache override timeout.
    • getCacheOverrideTimeout

      public long getCacheOverrideTimeout()
      Get the timeout in milliseconds to use when overriding cache headers provided by the server.
    • setCacheOverrideTimeout

      public void setCacheOverrideTimeout(long timeOut)
      Set the timeout in milliseconds to use when overriding cache headers provided by the server.
    • shouldAutoAdvanceRoutes

      public boolean shouldAutoAdvanceRoutes()
      Indicates if the SDK will auto advance routes when a devices location moves along them.
    • setAutoAdvanceRoutes

      public void setAutoAdvanceRoutes(boolean autoAdvance)
      Enable/Disable auto advancing steps using location information during routing.
    • shouldForceSimulatedLocation

      public boolean shouldForceSimulatedLocation()
      Indicates if the SDK will force the use of the simulated location from the server rather than generated locations.
    • setForceSimulatedLocation

      public void setForceSimulatedLocation(boolean forceSimulatedLocation)
      Enable/Disable forcing the use of the simulated location from the server rather than generated locations.
    • shouldUseWifiLocation

      public boolean shouldUseWifiLocation()
      Indicates if the SDK will use wifi location (also known as FTM, RTT or 802.11mc) to compute location.
    • setUseWifiLocation

      public void setUseWifiLocation(Context context, boolean useWifiLocation)
      Enable/Disable use of wifi location (also known as FTM, RTT or 802.11mc)
    • setPickerStyle

      public void setPickerStyle(LevelPickerControl.PickerStyle pickerStyle)
    • getPickerStyle

      public LevelPickerControl.PickerStyle getPickerStyle()
    • showCompass

      public boolean showCompass()
      Indicates if the SDK will show the compass arrow on the blue dot.
    • setShowCompass

      public void setShowCompass(boolean showCompass)
      Enable/Disable the visibility of the compass arrow on the blue dot.
    • showUnpublishedMaps

      public boolean showUnpublishedMaps()
      Indicates if SDK APIs will also include maps that have not been marked published by the Editor.
    • setShowUnpublishedMaps

      public void setShowUnpublishedMaps(boolean showUnpublishedMaps)
      Enable/Disable if SDK APIs will also include maps that have not been marked published by the Editor.
    • useRSSICorrection

      public boolean useRSSICorrection()
      Indicates if RSSI correction will be used.

      This adjusts the received signal strength based on hardware type.

    • setRSSICorrection

      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.

      Parameters:
      useRSSICorrection - If RSSI correction should be used.
      override - If the server side value should be overridden - set true to force RSSI correction.
    • getDefaultMaxMapZoom

      public MapInfo.ZoomLevel getDefaultMaxMapZoom()
      Get the default max map zoom.
    • setDefaultMaxMapZoom

      public void setDefaultMaxMapZoom(MapInfo.ZoomLevel defaultMaxMapZoom)
      Set the default max map zoom.
    • getRouteSnapDistance

      public long getRouteSnapDistance()
      Get the snap threshold in meters for snapping generated locations to the route line while routing.
    • setRouteSnapDistance

      public void setRouteSnapDistance(long defaultSnapDistance)
      Set the snap threshold in meters for snapping generated locations to the route line while routing.
    • getRerouteDistance

      public long getRerouteDistance()
      Get the distance threshold in meters for rerouting.
    • setRerouteDistance

      public void setRerouteDistance(long rerouteDistance)
      Set the distance threshold for rerouting.
    • getRerouteDelay

      public long getRerouteDelay()
      Get the delay before rerouting is triggered.
    • setRerouteDelay

      public void setRerouteDelay(long rerouteDelay)
      Set the delay before rerouting is triggered.
    • getOrientationWarningThreshold

      public int getOrientationWarningThreshold()
      Get the degree threshold from the routing line that triggers a warning.
    • setOrientationWarningThreshold

      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.

      Parameters:
      degrees - degree threshold at which the compass is considered poorly aligned.
    • getOrientationWarningDelay

      public int getOrientationWarningDelay()
      Get the delay (in milliseconds) before the orientation warning is set/cleared.
    • setOrientationWarningDelay

      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.

      Parameters:
      milliseconds - time before the orientation warning is set or removed (in milliseconds)
    • getBluedotComputationInterval

      public int getBluedotComputationInterval()
      Get the interval in seconds between bluedot computations.
    • setBluedotComputationInterval

      public void setBluedotComputationInterval(int intervalSeconds)
      Set the interval in seconds between bluedot computations.

      Minimum value is 2, the default value is 4.

    • getLocationSharingForegroundJobInterval

      public int getLocationSharingForegroundJobInterval()
      Get the interval in seconds between location sharing updates while in the foreground.
    • setLocationSharingForegroundJobInterval

      public void setLocationSharingForegroundJobInterval(int intervalSeconds)
      Set the interval in seconds between location sharing updates while in the foreground.

      Minimum value is 2, the default value is 20. Note that this is not guaranteed to be honored by the OS. More frequent intervals may negatively affect battery life.

    • getLocationSharingBackgroundJobInterval

      public int getLocationSharingBackgroundJobInterval()
      Get the interval in seconds between location sharing updates while in the background.
    • setLocationSharingBackgroundJobInterval

      public void setLocationSharingBackgroundJobInterval(int intervalSeconds)
      Set the interval in seconds between location sharing updates while in the background.

      Minimum value is 30, the default value is 60. Note that this is not guaranteed to be honored by the OS and will be overridden by OS doze minimums. More frequent intervals may negatively affect battery life.

    • setCustomHttpHeaders

      public void setCustomHttpHeaders(Map<String,String> httpHeaders)
      Set custom headers to HTTP requests.

      Reserved for Meridian use

      Parameters:
      httpHeaders - headers to be added
    • getCustomHttpHeaders

      public Map<String,String> getCustomHttpHeaders()
      Get custom headers for HTTP requests.
    • getSystemLocationAccuracyThreshold

      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.
    • setSystemLocationAccuracyThreshold

      public void setSystemLocationAccuracyThreshold(float systemLocationAccuracyThreshold)
      Set the system-provided services accuracy threshold.

      Defaults to 10.

    • getBuildingsThreshold

      public int getBuildingsThreshold()
      Returns the threshold for number of buildings to decide between the old vs.

      new level-picker UI

    • setBuildingsThreshold

      public void setBuildingsThreshold(int buildingsThreshold)
      Set the number of buildings threshold.

      Defaults to 20.

    • isMapPickerHighestFloorOnTop

      public boolean isMapPickerHighestFloorOnTop()
      Returns:
      true if the map picker’s order is highest to lowest floors or false if it’s the opposite.
    • setMapPickerHighestFloorOnTop

      public void setMapPickerHighestFloorOnTop(boolean mapPickerHighestFloorOnTop)
      Sets the order of the floors on map picker which is either sorted from highest to lowest or the opposite.
      Parameters:
      mapPickerHighestFloorOnTop - indicates if map picker should display highest to lowest floors or the opposite.
    • isMapPickerSearchEnabled

      public boolean isMapPickerSearchEnabled()
      Returns:
      true if search bar is enabled for map picker with PICKER_SEARCH picker style, false otherwise.
    • setMapPickerSearchBarEnabled

      public void setMapPickerSearchBarEnabled(boolean enableMapPickerSearch)
      Enables or disables search bar for map picker with PICKER_SEARCH picker style.

      NOTE: Search bar can be disabled only if there are less than 10 buildings each with less than 10 floors.

      Parameters:
      enableMapPickerSearch - indicates if search bar should be enabled or not.
    • isDarkThemeSupported

      public boolean isDarkThemeSupported()
      Returns:
      Returns if dark theme support is enabled in the app.
    • supportDarkTheme

      public void supportDarkTheme(boolean supportDarkTheme)
      Enables support for dark theme.

      Note that dark theme is currently available on Android 10 and higher.

      Parameters:
      supportDarkTheme - indicates if dark theme support should be enabled.
    • isGPSOnly

      public boolean isGPSOnly()
      Returns:
      Returns if GPS only support is enabled in the app.
    • supportGPSOnly

      public void supportGPSOnly(boolean supportGPSOnly)
      Enables support for GPS only location.

      This disables checking if bluetooth is enabled. Recommended to be false (the default), unless the location uses GPS exclusively

      Parameters:
      supportGPSOnly - indicates if the location uses GPS exclusively.
    • setTextFont

      public void setTextFont(Typeface font, Typeface semiBoldFont, Typeface boldFont)
      Set the regular, semi-bold, and bold fonts for text.

      NOTE: Both Android built-in fonts and custom fonts can be set.

      Parameters:
      font - font to be set. By default, open_sans_regular is used.
      semiBoldFont - semi-bold font to be set. By default, open_sans_semibold is used.
      boldFont - bold font to be set. By default, open_sans_bold is used.
    • getTextFont

      public Typeface getTextFont()
      Returns:
      Returns the text font.
    • getTextSemiBoldFont

      public Typeface getTextSemiBoldFont()
      Returns:
      Returns the text semi-bold font.
    • getTextBoldFont

      public Typeface getTextBoldFont()
      Returns:
      Returns the text bold font.
    • setLogLevel

      public void setLogLevel(int newLevel)
      Set the logcat reporting level using android.util.Log values.

      Defaults to android.util.Log.VERBOSE.

    • getLogLevel

      public int getLogLevel()
      Get the logcat reporting level.
    • showMaps

      public boolean showMaps()
      Get if maps should be shown (SUB1-MAPS-100).
    • showBlueDot

      public boolean showBlueDot()
      Get if blue dot should be shown (SUB1-BLUE-100).
    • showTags

      public boolean showTags()
      Get if Tags should be shown (SUB1-TAGS-100).
    • setShowTags

      public void setShowTags(boolean showTags)
      Indicate if Tags should be shown.