setPreferredService method

Future<void> setPreferredService(
  1. bool preferred
)

Makes this app the preferred handler while it is in the foreground.

Without it a tap can go to whichever app owns the AID by default, which for payment AIDs is the user's wallet. Pair it with the app's lifecycle: true on resume, false on pause.

Implementation

Future<void> setPreferredService(bool preferred) => androidApi.hceSetPreferredService(preferred);