Precondition Checks
MTP SDK runs Precondition checks when various SDK methods are called. If Precondition check fails, a specific MeaErrorCode
is returned.
MeaTokenPlatform.initialize()
precondition checks:
- Rooted device precondition check. Rooted devices are not eligible to use MTP SDK. Throws a Rooted device error.
- Version rollback check. Older MTP SDK version is not allowed to be installed over a later MTP SDK version. Returns
MeaErrorCode.VERSION_ROLLBACK
. - Debugger check. Debugging is not allowed for MTP SDK prod config. Returns
MeaErrorCode.DEBUGGER_ATTACHED
. - Architecture check. Device must be
ARM
orAARCH64
. ReturnsMeaErrorCode.ABI_NOT_SUPPORTED
. - OS version check. Android OS version must be 6.0 and later for Locally-verified CDCVM, or 4.4 and later for Mobile PIN. Returns
MeaErrorCode.OS_VERSION_NOT_SUPPORTED
. - SDK config check. Production APK release build using MTP SDK must integrate MTP SDK prod release configuration. Returns
MeaErrorCode.SDK_DEBUG_IN_APP_RELEASE_NOT_ALLOWED
.
MeaTokenPlatform.register()
precondition checks:
- Register check. MTP SDK must be registered only once. Returns
MeaErrorCode.ALREADY_REGISTERED
. - Debugger check. Debugging is not allowed for MTP SDK prod config. Returns
MeaErrorCode.DEBUGGER_ATTACHED
. - Network connection check. Device must be connected to the Internet for
register()
call. ReturnsMeaErrorCode.NO_NETWORK_CONNECTION
. - Google Play services check. Device must have Google Play services available for push notification functionality. Returns
MeaErrorCode.GOOGLE_PLAY_SERVICES_NOT_AVAILABLE
.
MeaTokenPlatform.initializeDigitization()
precondition checks:
- Register check. MTP SDK must be registered with
register()
beforeinitializeDigitization()
can succeed. ReturnsMeaErrorCode.NOT_REGISTERED
. - Debugger check. Debugging is not allowed for MTP SDK prod config. Returns
MeaErrorCode.DEBUGGER_ATTACHED
. - Network connection check. Device must be connected to the Internet for
register()
call. ReturnsMeaErrorCode.NO_NETWORK_CONNECTION
. - Google Play services check. Device must have Google Play services available for push notification functionality. Returns
MeaErrorCode.GOOGLE_PLAY_SERVICES_NOT_AVAILABLE
.
MeaTokenPlatform.completeDigitization()
precondition checks:
- Register check. MTP SDK must be registered with
register()
beforecompleteDigitization()
can succeed. ReturnsMeaErrorCode.NOT_REGISTERED
. - Debugger check. Debugging is not allowed for MTP SDK prod config. Returns
MeaErrorCode.DEBUGGER_ATTACHED
. - Network connection check. Device must be connected to the Internet for
register()
call. ReturnsMeaErrorCode.NO_NETWORK_CONNECTION
. - Google Play services check. Device must have Google Play services available for push notification functionality. Returns
MeaErrorCode.GOOGLE_PLAY_SERVICES_NOT_AVAILABLE
.
MeaCard.setAsDefaultForContactlessPayments()
precondition checks:
- Register check. MTP SDK must be registered with
register()
beforesetAsDefaultForContactlessPayments()
can succeed. ReturnsMeaErrorCode.NOT_REGISTERED
. - Debugger check. Debugging is not allowed for MTP SDK prod config. Returns
MeaErrorCode.DEBUGGER_ATTACHED
.
MeaCard.selectForContactlessPayment()
precondition checks:
- Register check. MTP SDK must be registered with
register()
beforesetAsDefaultForContactlessPayments()
can succeed. ReturnsMeaErrorCode.NOT_REGISTERED
. - Debugger check. Debugging is not allowed for MTP SDK prod config. Returns
MeaErrorCode.DEBUGGER_ATTACHED
. - NFC check. Device must have NFC functionality available and enabled. Returns
MeaErrorCode.NFC_NOT_AVAILABLE
. - HCE check. Device must have HCE functionality available and enabled. Returns
MeaErrorCode.HCE_NOT_AVAILABLE
. - Default payment app check. Application must be selected as default application for payments. Returns
MeaErrorCode.APPLICATION_NOT_DEFAULT_FOR_CONTACTLESS
.