Class Config


  • public final class Config
    extends java.lang.Object
    Class to build a configuration for Batch SDK
    • Constructor Summary

      Constructors 
      Constructor Description
      Config​(java.lang.String apikey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      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.
      Config setCanUseAdvertisingID​(boolean canUse)
      Set if Batch can use AvertisingId (default = true)

      Setting this to false have a negative impact on offer delivery and restore
      You should only use it if you know what you are doing.
      Config setCanUseAndroidID​(boolean canUse)
      Deprecated.
      No replacement.
      Config setCanUseInstanceID​(boolean canUse)
      Deprecated.
      Please switch to Firebase Cloud Messaging
      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.
      Config setLoggerLevel​(LoggerLevel level)
      Set the log level Batch should use
      Config setShouldAutomaticallyRegisterPush​(boolean shouldAutomaticallyRegisterPush)
      Deprecated.
      This feature isn't supported anymore
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Config

        public Config​(java.lang.String apikey)
        Parameters:
        apikey -
    • Method Detail

      • 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

        public Config setCanUseAdvertisingID​(boolean canUse)
        Set if Batch can use AvertisingId (default = true)

        Setting this to false have a negative impact on offer delivery and restore
        You should only use it if you know what you are doing.
        Parameters:
        canUse - can Batch use AdvertisingID
      • 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.

        Note: Disabling this does not automatically disable Android ID/Advertising ID collection, use the appropriate methods to control these.

        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