Class Batch.User

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

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

    • getInstallationID

      public static String getInstallationID()
      Get the unique installation ID, generated by Batch. Batch must be started to read it.
      Returns:
      Batch-generated installation ID. Might be null if Batch isn't started.
    • getLanguage

      public static String getLanguage(Context context)
      Read the language.
      Returns:
      The custom language set with InstallDataEditor. Returns null by default.
    • getRegion

      public static String getRegion(Context context)
      Read the region.
      Returns:
      The custom region set with InstallDataEditor. Returns null by default.
    • getIdentifier

      public static String getIdentifier(Context context)
      Read the custom identifier.
      Returns:
      The custom identifier set with InstallDataEditor. Returns null by default.
    • fetchAttributes

      public static void fetchAttributes(Context context, BatchAttributesFetchListener listener)
      Read the saved attributes. Reading is asynchronous so as not to interfere with saving operations.
      Parameters:
      context - Android's context
      listener - Pass a listener to be notified of the fetch result.
    • fetchTagCollections

      public static void fetchTagCollections(Context context, BatchTagCollectionsFetchListener listener)
      Read the saved tag collections. Reading is asynchronous so as not to interfere with saving operations.
      Parameters:
      context - Android's context
      listener - Pass a listener to be notified of the fetch result.
    • clearInstallationData

      public static void clearInstallationData()
      Clear all tags and attributes set on an installation and their local cache returned by fetchAttributes and fetchTagCollections. This doesn't affect data set on profiles using Batch.Profile.