Enum Class MobileGatewayManager
- All Implemented Interfaces:
Serializable,Comparable<MobileGatewayManager>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(android.content.Context context) This is the main entry point to initialize and configure the MG SDK.voidconfigure(android.content.Context context, MGConfiguration... mgConfigurations) This is the main entry point to initialize and configure the MG SDK.getCardArt(String digitalCardId) Card arts are used by the MPA for display such as card images.An API to get the instance of Card Enrollment Service.An API to get the instance of Card Lifecycle Manager.An API to get the instance of Card Manager.Returns current state of the Configuration State of the SDK.An API to get the instance of MGTransactionHistoryService.voidresetSDKStorage(android.content.Context context, MGConfigurationResetListener listener) Deprecated.since 6.6, it is not recommended to call this API alone.static MobileGatewayManagerReturns the enum constant of this class with the specified name.static MobileGatewayManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
configure
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 onlyMGConnectionConfigurationis 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 @MGConfigurationResetListenerfor more details
-
getConfigurationState
Returns current state of the Configuration State of the SDK.- Returns:
- MGSDKConfigurationState current state of the Configuration State of the SDK.
Please see
MGSDKConfigurationStatefor more details
-
getCardArt
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
An API to get the instance of Card Enrollment Service.- Returns:
- the Card Enrollment Service.
-
getCardLifeCycleManager
An API to get the instance of Card Lifecycle Manager.- Returns:
- the Card Lifecycle Manager.
-
getTransactionHistoryService
An API to get the instance of MGTransactionHistoryService.- Returns:
- the TransactionHistoryService to query for transaction history list
-
getCardManager
An API to get the instance of Card Manager.- Returns:
- the Card Lifecycle Manager.
-