Hi,
I am integrating the HCE-based API into our SDK.
Ideal flow
It is bit tricky to support card change (step 3 below) after field-detect/double click due to NFC action sheet. Ideally, the flow is:
- User double-click.
- App launch
- "Hold near Reader" NFC instruction
- (optional) User change card
- User tap device to POS reader
- payment succeed.
Approach A
If I follow the code snippet in CardSession, where it calls startEmulation after readerDetected, I could change card before that. However, the "Hold near Reader" NFC instruction is shown very late, during tap.
- User double-click
- App launch
- (optional)User change card
- User tap device to POS reader
- "Hold near Reader" NFC instruction
- payment succeed.
Approach B
If I call startEmulation after sessionStarted, I could show "Hold near Reader" NFC. However, I could not provide the optional capability to change card anymore.
- User double-click
- App launch
- "Hold near Reader" NFC instruction
- User tap device to POS reader
- payment succeed.
Neither approach A or B provide optimal approach shown in Ideal flow.
Is this expected from CardSession that there is no option to startEmulation without the action sheet?
Is there a plan to improve startEmulation so that it could show "Hold near Reader" without the action sheet?
Thank you.