Class Batch.Profile

java.lang.Object
com.batch.android.Batch.Profile
Enclosing class:
Batch

public static final class Batch.Profile extends Object
Batch Profile module
  • Method Details

    • identify

      public static void identify(String identifier)
      Identify the user's installation with an omnichannel profile.
      Parameters:
      identifier - the custom user identifier or null to erase
    • editor

      public static BatchProfileAttributeEditor editor()
      Get a profile attribute editor.

      Batch must be started to save it. Note that you should chain calls to the returned editor. If you call this method again, you will get another editor that's not aware of changes made elsewhere that have not been saved.

      Returns:
      A BatchProfileAttributeEditor instance.
    • trackEvent

      public static void trackEvent(String event)
      Track an event. You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.
      Parameters:
      event - The event name.
    • trackEvent

      public static void trackEvent(String event, BatchEventAttributes attributes)
      Track an event. You can call this method from any thread. Batch must be started at some point, or events won't be sent to the server.
      Parameters:
      event - The event name.
      attributes - The event attributes. Can be null.
    • trackLocation

      public static void trackLocation(Location location)
      Track a location update. You can call this method from any thread. Batch must be started at some point, or location updates won't be sent to the server.
      The location object usually comes from the location system service, or the Fused Location API, but can also manually create it.
      If you manually create it, please make sure to fill the accuracy and date if you have that data: both of these values are used to improve the targeting.
      Parameters:
      location - The location. Can't be null.