Enum SDKInitializer
- java.lang.Object
-
- java.lang.Enum<SDKInitializer>
-
- com.gemalto.mfs.mwsdk.payment.sdkconfig.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.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
configure(android.content.Context context)
Set the Android applicationContext
to SDK.void
configure(android.content.Context context, android.app.Notification notification, CustomConfiguration customConfiguration)
Deprecated.6.8.0 : Useconfigure(Context, CustomConfiguration)
void
configure(android.content.Context context, CustomConfiguration customConfiguration)
Set the Android applicationContext
to SDK.com.thalesgroup.gemalto.securelog.SecureLog
configureSecureLog(com.thalesgroup.gemalto.securelog.SecureLogConfig config)
Configure the secure log.void
initialize(android.content.Context context)
Initialize the SDK with default configuration.void
initialize(android.content.Context context, android.app.Notification notification, CustomConfiguration configuration)
Deprecated.since 6.8.0 : Useinitialize(Context, CustomConfiguration)
void
initialize(android.content.Context context, CustomConfiguration configuration)
Initialize the SDK with customized configuration.void
initialize(android.content.Context context, CustomConfiguration configuration, SDKControllerListener sdkControllerListener)
Initialize the SDK.void
initialize(android.content.Context context, SDKControllerListener sdkControllerListener)
Initialize the SDK with default configuration.void
initialize(android.content.Context context, SDKControllerListener sdkControllerListener, android.app.Notification notification)
Deprecated.since 6.8.0 : Useinitialize(Context, SDKControllerListener)
void
initialize(android.content.Context context, SDKControllerListener sdkControllerListener, android.app.Notification notification, CustomConfiguration configuration)
Deprecated.since 6.8.0 : Useinitialize(Context,CustomConfiguration, SDKControllerListener)
static SDKInitializer
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SDKInitializer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final SDKInitializer INSTANCE
-
-
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 namejava.lang.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
Deprecated.6.8.0 : Useconfigure(Context, CustomConfiguration)
Set the Android applicationContext
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 theApplication.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
- AndroidContext
- 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 applicationContext
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 theApplication.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
- AndroidContext
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 applicationContext
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 theApplication.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
- AndroidContext
- 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.since 6.8.0 : Useinitialize(Context, 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 ensureconfigure(Context, Notification, CustomConfiguration)
is called.- Parameters:
context
- Android ContextsdkControllerListener
- notifies SDK Initialization such as complete, in progress and error occurrednotification
-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 ensureconfigure(Context, Notification, CustomConfiguration)
is called.- Parameters:
context
- Android ContextsdkControllerListener
- 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)
Deprecated.since 6.8.0 : Useinitialize(Context,CustomConfiguration, 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 ensureconfigure(Context, Notification, CustomConfiguration)
is called.- Parameters:
context
- Android ContextsdkControllerListener
- notifies SDK Initialization such as complete, in progress and error occurrednotification
-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 ensureconfigure(Context, Notification, CustomConfiguration)
is called.- Parameters:
context
- Android ContextsdkControllerListener
- notifies SDK Initialization such as complete, in progress and error occurredconfiguration
- 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.since 6.8.0 : Useinitialize(Context, CustomConfiguration)
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 Contextnotification
-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 Contextconfiguration
- 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
-
-