getPendingIntent

fun getPendingIntent(source: PresentmentSource, initiallySelectedDocumentId: String?, openWalletAppPendingIntentFn: (document: Document) -> PendingIntent, preferredServices: List<ComponentName>): PendingIntent

Get a PendingIntent to launch PresentmentActivity in document chooser mode.

In document chooser mode, the user is presented with a list of documents from source rendered using VerticalDocumentList. The document indicated by initiallySelectedDocumentId is selected and by tapping the document pile at the bottom the user can select another document. The user is also presented with a "Open Wallet" button (replacing "Wallet" with Branding.Current.appName if not null) which if pressed will launch openWalletAppPendingIntentFn.

This is intended to be used in QuickAccessWalletService.getGestureTargetActivityPendingIntent which is called whenever the user double-clicks the power button.

Parameters

source

the source of truth of what to present.

initiallySelectedDocumentId

the Document identifier for the document to focus in the document chooser.

openWalletAppPendingIntentFn

a function to return a PendingIntent to use for when the user presses the "Open Wallet" button.

preferredServices

a list of ComponentNames which will be preferred over other services. This is used in onResume to pass to CardEmulation.setPreferredService.