Class RuntimeEnvironment

java.lang.Object
com.mparticle.sdk.model.eventprocessing.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()
      Returns:
      runtime environment type
    • isDebug

      public boolean isDebug()
      Returns:
      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:
      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.
      Parameters:
      sdkVersion - SDK version, ex: "6.12.1", may be null
    • getUserAgent

      public String getUserAgent()
      Returns:
      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
      Parameters:
      userAgent - value
    • getIdentities

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

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