Enum MobileGatewayManager
- java.lang.Object
-
- java.lang.Enum<MobileGatewayManager>
-
- com.gemalto.mfs.mwsdk.mobilegateway.MobileGatewayManager
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MobileGatewayManager>
public enum MobileGatewayManager extends java.lang.Enum<MobileGatewayManager>
The mobile gateway manager in the main entry point of the MG SDK. Initialization happens on this component as well as the retrieval of Card Enrollment Service and Card Lifecycle Manager. After the card is digitized, an API to retrieve its underlying card arts are also retrieved on this component. Card arts include product name and its resources such as images.
-
-
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)
This is the main entry point to initialize and configure the MG SDK.void
configure(android.content.Context context, MGConfiguration... mgConfigurations)
This is the main entry point to initialize and configure the MG SDK.CardArt
getCardArt(java.lang.String digitalCardId)
Card arts are used by the MPA for display such as card images.MGCardEnrollmentService
getCardEnrollmentService()
An API to get the instance of Card Enrollment Service.MGCardLifeCycleManager
getCardLifeCycleManager()
An API to get the instance of Card Lifecycle Manager.MGCardManager
getCardManager()
An API to get the instance of Card Manager.MGSDKConfigurationState
getConfigurationState()
Returns current state of the Configuration State of the SDK.MGTransactionHistoryService
getTransactionHistoryService()
An API to get the instance of MGTransactionHistoryService.void
resetSDKStorage(android.content.Context context, MGConfigurationResetListener listener)
Deprecated.since 6.6, it is not recommended to call this API alone.static MobileGatewayManager
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MobileGatewayManager[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MobileGatewayManager INSTANCE
-
-
Method Detail
-
values
public static MobileGatewayManager[] 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 (MobileGatewayManager c : MobileGatewayManager.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MobileGatewayManager 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) throws MGConfigurationException
This is the main entry point to initialize and configure the MG SDK. Passed along is the Android Context. Since 6.6, this call is idempotent, and can be called multiple times. SDK manages the state internally if it is already initialized. The configurations is to be provided as mobilegateway.properties file packaged into assets with following data.MobileGateway connection related configurations:
- MG_CONNECTION_URL
- MG_CONNECTION_TIMEOUT
- MG_CONNECTION_READ_TIMEOUT
- MG_CONNECTION_RETRY_COUNT
- MG_CONNECTION_RETRY_INTERVAL
Wallet related configurations:
- WALLET_PROVIDER_ID
- WALLET_APPLICATION_ID (optional)
Transaction History related configurations:
- MG_TRANSACTION_HISTORY_CONNECTION_URL
- Parameters:
context
- the Application context- Throws:
MGConfigurationException
- in case of argument error- Since:
- 6.6.0
-
configure
public void configure(@NonNull android.content.Context context, MGConfiguration... mgConfigurations) throws MGConfigurationException
This is the main entry point to initialize and configure the MG SDK. Passed along is the Android Context. 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
- the current contextmgConfigurations
- Array of configuration objects. For now onlyMGConnectionConfiguration
is allowed.- Throws:
MGConfigurationException
- in case of argument error
-
resetSDKStorage
public void resetSDKStorage(@NonNull android.content.Context context, @Nullable MGConfigurationResetListener listener)
Deprecated.since 6.6, it is not recommended to call this API alone. To avoid de-synchronization of walletId, it is recommended to call wipe fromSDKDataController.wipeAll(android.content.Context)
which also helps to wipe MG.This method will reset the Storage of SDK and regenerate new identification parameters for the SDK instance.- Parameters:
context
- Android contextlistener
- callbacks in the listener will be called. Please see @MGConfigurationResetListener
for more details
-
getConfigurationState
public MGSDKConfigurationState getConfigurationState()
Returns current state of the Configuration State of the SDK.- Returns:
- MGSDKConfigurationState current state of the Configuration State of the SDK.
Please see
MGSDKConfigurationState
for more details
-
getCardArt
public CardArt getCardArt(java.lang.String digitalCardId) throws NoSuchCardException
Card arts are used by the MPA for display such as card images. A product ID is used to distinguish the card which can be retrieved in CPS SDK after card provisioning.- Parameters:
digitalCardId
- unique id of the card.- Returns:
- the card art to be displayed by the MPA.
- Throws:
NoSuchCardException
- is thrown if the the card related to the product Id is not present or an internal error occured.
-
getCardEnrollmentService
public MGCardEnrollmentService getCardEnrollmentService()
An API to get the instance of Card Enrollment Service.- Returns:
- the Card Enrollment Service.
-
getCardLifeCycleManager
public MGCardLifeCycleManager getCardLifeCycleManager()
An API to get the instance of Card Lifecycle Manager.- Returns:
- the Card Lifecycle Manager.
-
getTransactionHistoryService
public MGTransactionHistoryService getTransactionHistoryService()
An API to get the instance of MGTransactionHistoryService.- Returns:
- the TransactionHistoryService to query for transaction history list
-
getCardManager
public MGCardManager getCardManager()
An API to get the instance of Card Manager.- Returns:
- the Card Lifecycle Manager.
-
-