Enum SDKInitializer

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SDKInitializer>

    public enum SDKInitializer
    extends java.lang.Enum<SDKInitializer>
    This enum contains the public APIs for initializing the SDK before starting the payment. This API registers all the required modules in the SDK.
    • Method Detail

      • values

        public static SDKInitializer[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SDKInitializer c : SDKInitializer.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SDKInitializer valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • configure

        public void configure​(@NonNull
                              android.content.Context context,
                              @NonNull
                              CustomConfiguration customConfiguration)
                       throws InternalComponentException
        Set the Android application Context to SDK. This is a safeguard API that ensures proper context is set to SDK as early as the Application entry point.

        This API is recommended to be called synchronously inside the Application.onCreate() to avoid possible sdk errors raised due to null context, especially when the MPA has multiple entry points and can mistakenly invoke any SDK API before initialization completes.

        Note: This API has to be called before calling following initialization APIs

        Parameters:
        context - Android Context
        customConfiguration - custom configurations used by application.
        Throws:
        InternalComponentException - when some internal errors occurred, we will throw this exception with error co
        Since:
        6.8.0
      • configure

        public void configure​(@NonNull
                              android.content.Context context)
                       throws InternalComponentException
        Set the Android application Context to SDK. This configures the SDK with default configuration. This is a safeguard API that ensures proper context is set to SDK as early as the Application entry point.

        This API is recommended to be called synchronously inside the Application.onCreate() to avoid possible sdk errors raised due to null context, especially when the MPA has multiple entry points and can mistakenly invoke any SDK API before initialization completes.

        Note: This API has to be called before calling following initialization APIs

        Parameters:
        context - Android Context
        Throws:
        InternalComponentException - when some internal errors occurred, we will throw this exception with error co
        Since:
        6.8.0
      • initialize

        public void initialize​(android.content.Context context,
                               SDKControllerListener sdkControllerListener,
                               @Nullable
                               android.app.Notification notification)
        Deprecated.
        Initialize the SDK with default configuration. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.

        Note: Before calling this API, please ensure configure(Context, Notification, CustomConfiguration) is called.

        Parameters:
        context - Android Context
        sdkControllerListener - notifies SDK Initialization such as complete, in progress and error occurred
        notification - Notification
      • initialize

        public void initialize​(android.content.Context context,
                               SDKControllerListener sdkControllerListener)
        Initialize the SDK with default configuration. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.

        Note: Before calling this API, please ensure configure(Context, Notification, CustomConfiguration) is called.

        Parameters:
        context - Android Context
        sdkControllerListener - notifies SDK Initialization such as complete, in progress and error occurred
        Since:
        6.8.0
      • initialize

        public void initialize​(android.content.Context context,
                               SDKControllerListener sdkControllerListener,
                               @Nullable
                               android.app.Notification notification,
                               @Nullable
                               CustomConfiguration configuration)
        Initialize the SDK. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.

        Note: Before calling this API, please ensure configure(Context, Notification, CustomConfiguration) is called.

        Parameters:
        context - Android Context
        sdkControllerListener - notifies SDK Initialization such as complete, in progress and error occurred
        notification - Notification
        configuration - custom configurations used by application.
        Since:
        6.4.0
      • initialize

        public void initialize​(@NonNull
                               android.content.Context context,
                               @NonNull
                               CustomConfiguration configuration,
                               @NonNull
                               SDKControllerListener sdkControllerListener)
        Initialize the SDK. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.

        Note: Before calling this API, please ensure configure(Context, Notification, CustomConfiguration) is called.

        Parameters:
        context - Android Context
        sdkControllerListener - notifies SDK Initialization such as complete, in progress and error occurred
        configuration - custom configurations used by application.
        Since:
        6.8.0
      • initialize

        public void initialize​(@NonNull
                               android.content.Context context,
                               @Nullable
                               android.app.Notification notification,
                               @Nullable
                               CustomConfiguration configuration)
                        throws SDKInitializationException
        Deprecated.
        Initialize the SDK. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.
        Parameters:
        context - Android Context
        notification - Notification
        configuration - custom configurations used by application.
        Throws:
        SDKInitializationException
        Since:
        6.6.0
      • initialize

        public void initialize​(@NonNull
                               android.content.Context context,
                               @NonNull
                               CustomConfiguration configuration)
                        throws SDKInitializationException
        Initialize the SDK with customized configuration. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.
        Parameters:
        context - Android Context
        configuration - custom configurations used by application.
        Throws:
        SDKInitializationException
        Since:
        6.8.0
      • initialize

        public void initialize​(@NonNull
                               android.content.Context context)
                        throws SDKInitializationException
        Initialize the SDK with default configuration. This is to be called before using other features from the SDK. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized.
        Parameters:
        context - Android Context
        Throws:
        SDKInitializationException
        Since:
        6.8.0
      • configureSecureLog

        public com.thalesgroup.gemalto.securelog.SecureLog configureSecureLog​(com.thalesgroup.gemalto.securelog.SecureLogConfig config)
        Configure the secure log. This will enable the securely logging feature.
        Parameters:
        config - The SecureLog configuration. Refer to SecureLogConfig.Builder() for more information.
        Returns:
        The SecureLog object
        Since:
        6.6.0