Enum Class SDKInitializer

java.lang.Object
java.lang.Enum<SDKInitializer>
com.gemalto.mfs.mwsdk.payment.sdkconfig.SDKInitializer
All Implemented Interfaces:
Serializable, Comparable<SDKInitializer>, Constable

public enum SDKInitializer extends 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.
  • Enum Constant Details

  • Method Details

    • values

      public static SDKInitializer[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SDKInitializer valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • configure

      public void configure(@NonNull android.content.Context context, @Nullable android.app.Notification notification, @Nullable 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
      Throws:
      InternalComponentException - when some internal errors occurred, we will throw this exception with error co
      Since:
      6.4.3
    • 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

      @Deprecated public com.thalesgroup.gemalto.securelog.SecureLog configureSecureLog(com.thalesgroup.gemalto.securelog.SecureLogConfig config)
      Deprecated.
      Since 6.14.0, please use getLogService(Context) instead.
      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
    • getLogService

      @NonNull public static LogService getLogService(@NonNull android.content.Context context)
      To get the LogService instance generated by the TSHPay SDK.
      Parameters:
      context - Android context
      Returns:
      LogService instance.
      Since:
      6.14.0