Class RuntimeEnvironment

Direct Known Subclasses:
AndroidRuntimeEnvironment, FireTVRuntimeEnvironment, GenericRuntimeEnvironment, IosRuntimeEnvironment, RokuRuntimeEnvironment, TVOSRuntimeEnvironment, UnknownRuntimeEnvironment, WebRuntimeEnvironment, XboxRuntimeEnvironment

public abstract class RuntimeEnvironment extends Object
  • Constructor Details

  • Method Details

    • getType

      public RuntimeEnvironment.Type getType()
      runtime environment type
    • isDebug

      public boolean isDebug()
      true if application is running in the debug mode
    • getClientIpAddress

      public String getClientIpAddress()
      Get the IP address of the original request. Requests to the mParticle API may come from a browser, and iOS/tvOS/Android device, or a server when data originates from a server-to-server integration.
      returns the IP address of the client request
    • setClientIpAddress

      public void setClientIpAddress(String clientIpAddress)
    • getSdkVersion

      public String getSdkVersion()
    • setSdkVersion

      public void setSdkVersion(String sdkVersion)
      Get the SDK version associated with this request. mParticle customers can use a variety of SDKs to send data into the mParticle platform. The Android, iOS, and Javascript client SDKs will automatically include their SDK version with each request, which will be included in the respective outgoing Firehose request. Customers who use the mParticle server-to-server SDKs, or who send data to mParticle using their own HTTP clients may not include any SDK version.
      sdkVersion - SDK version, ex: "6.12.1", may be null
    • getUserAgent

      public String getUserAgent()
      the user agent HTTP header sent by this runtime environment
    • setUserAgent

      public void setUserAgent(String userAgent)
      Set the user agent HTTP header that is sent by this runtime environment
      userAgent - value
    • getIdentities

      public List<DeviceIdentity> getIdentities()
      the device identities
    • setIdentities

      public void setIdentities(List<DeviceIdentity> identities)
      Set the device identities
      identities -