Android Push Provisioning v2.0.0
Changes
This version is a major update over 1.0.0 that includes removals and changes in the public interface of the SDK, as well as a completely new distribution method. Make sure you address these changes by following the instructions in the migration guide at the end of the release notes for this version.
Compatibility
Minimum Android SDK: 24 (Android 7.0 Nougat)
Compile SDK: 35
Target SDK: 35
Kotlin: 1.8.0 or newer
Google Pay device requirements: Google Play services must be installed and up to date; NFC only needed for default-payment flows.
Added
- Added
onCancelled()toAddToWalletListener. - Added
WPPComponents.initializeWeavrSDK(context: Context, uiKey: String)to initialise the SDK instead ofWPPComponents.initWeavrGPayClient. - Added
WPPComponents.getCardStatusto replaceWPPComponents.canAddCardToWalletavoiding listeners and using coroutines instead. - Added
WPPComponents.setDefaultCardInGooglePayto replaceWPPComponents.setCardAsDefaultPaymentMethod. - Added
WPPExceptionto subclass Exception for throwing, as well as to standardise the error reporting within the SDK. Note that the SDK won't be throwing and instead useOutcometo report success or error. - Added
WeavrSDKErrorCodesto contain a list of error codes the SDK can use. - Added states
PENDINGandSUSPENDEDtoCardStatus. - Added multiple push provisioningPush Provisioning A method that allows cardholders to add their card to a digital wallet (such as Apple Pay or Google Pay) directly from your app. The card details are securely tokenized and sent to the wallet provider, streamlining the process and enhancing the user experience compared to manual provisioning. This feature is currently in beta. providers to maximise up-time and reliability.
Breaking changes
- Updated SDK access process—contact support@weavr.io to receive the latest package and onboarding instructions.
- Changed
WPPComponents.isGooglePayAvailableto be a synchronous method rather than using coroutines needlessly. - Changed
onError(WPPException)inAddToWalletListener. This replaces the oldonError(WPPError)as theWPPErrortype had less information on what went wrong.
Removed
- Removed
WPPComponents.launchGpayas the result ofWPPComponents.getPushProvisioningLauncherincludes aprovisionCardmethod instead.
Deprecated
- Deprecated
WPPComponents.initWeavrGPayClientin favour ofWPPComponents.initializeWeavrSDK. - Deprecated
CardStatusListenerin favour of an async method to get the card status. - Deprecated
WPPComponents.canAddCardToWalletin favour ofWPPComponents.getCardStatus. - Deprecated
WPPComponents.setGPayAsDefaultNFCPaymentMethodin favour ofWPPComponents.setGooglePayAsDefaultNFCPaymentMethod. This avoids using coroutines needlessly as the outcome depends only on whether the activity to select was able to be launched or not, not the actual result. - Deprecated
WPPComponents.getGpayLauncherin favour ofWPPComponents.getPushProvisioningLauncherto improve naming consistency. - Deprecated
WPPComponents.setCardAsDefaultPaymentMethodwithWPPComponents.setDefaultCardInGooglePayas the callback was unnecessary due to callback being called from within the method itself. - Deprecated
WPPResultto be replaced withOutcome. This is becauseWPPResultwould use an optional Success generic type, forcing users to account for nulls everywhere. Additionally madeOutcomecompatible with KotlinResultby callingOutcome.asResult. - Deprecated the case
UnknownofCardStatus, and addedUNKNOWNfor consistency across state capitalisation. - Deprecated the case
GPayErrorofCardStatus. This state will no longer be used.
Other changes to note
- We have moved the SDK to work with AppCompactActivity preferably. Ensure that your activity is sub-classing it to avoid problems during provisioning.
- SDK binaries are now distributed directly by Weavr Support—request access via support@weavr.io.