Class Config

java.lang.Object
com.batch.android.Config

public final class Config extends Object
Class to build a configuration for Batch SDK
  • Constructor Details

    • Config

      public Config(String apikey)
      Parameters:
      apikey -
  • Method Details

    • setCanUseAndroidID

      @Deprecated public Config setCanUseAndroidID(boolean canUse)
      Deprecated.
      No replacement.
      Method kept for compatibility: Batch will not use the Android ID in any situation
    • setCanUseAdvertisingID

      @Deprecated public Config setCanUseAdvertisingID(boolean canUse)
      Deprecated.
      This method does nothing, please stop using it and see BatchUserDataEditor#setAttributionIdentifier(String)
      Batch doesn't support Android Advertising Identifier anymore.
      Parameters:
      canUse - This parameter does nothing.
    • setCanUseAdvancedDeviceInformation

      public Config setCanUseAdvancedDeviceInformation(boolean canUse)
      Set if Batch can use advanced device identifiers (default = true)

      Advanced device identifiers include information about the device itself, but nothing that directly identify the user, such as but not limited to: - Device model - Device brand - Carrier name
      Setting this to false have a negative impact on core Batch features
      You should only use it if you know what you are doing.
      Parameters:
      canUse - Can Batch use advanced device information?
    • setLoggerDelegate

      public Config setLoggerDelegate(LoggerDelegate delegate)
      Set if Batch should send its logs to an object of yours (default = null)

      Be careful with your implementation: setting this can impact stability and performance
      You should only use it if you know what you are doing.
      Parameters:
      delegate - An object implementing LoggerDelegate
    • setLoggerLevel

      public Config setLoggerLevel(LoggerLevel level)
      Set the log level Batch should use
      Parameters:
      level -
      Returns:
    • setCanUseInstanceID

      @Deprecated public Config setCanUseInstanceID(boolean canUse)
      Deprecated.
      Please switch to Firebase Cloud Messaging
      Set if Batch can use the Google Play Services Instance ID api (default = true)
      Setting this to false will make Batch fallback on the classic (and deprecated) GCM API.
      You should only use it if you know what you are doing.
      Parameters:
      canUse - can Batch use the Instance ID
    • setShouldAutomaticallyRegisterPush

      @Deprecated public Config setShouldAutomaticallyRegisterPush(boolean shouldAutomaticallyRegisterPush)
      Deprecated.
      This feature isn't supported anymore
      Set if Batch should automatically register for pushes using FCM or GCM. Note: This doesn't do anything anymore
      Parameters:
      shouldAutomaticallyRegisterPush - Doesn't do anything