Class MeaTransactionReceiver


  • public abstract class MeaTransactionReceiver
    extends android.content.BroadcastReceiver
    Receiver to handle various transaction events. App developers should extend this class and implement abstract methods to listen for events.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class android.content.BroadcastReceiver

        android.content.BroadcastReceiver.PendingResult
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void handleOnAuthenticationRequiredIntent​(android.content.Context context, java.lang.String cardId, MeaContactlessTransactionData data)
      Abstract method which should be implemented by application developers to handle authentication required event.
      abstract void handleOnTransactionFailureIntent​(android.content.Context context, java.lang.String cardId, MeaError error, MeaContactlessTransactionData data)
      Abstract method which should be implemented by application developers to handle transaction failure event.
      abstract void handleOnTransactionStartedIntent​(android.content.Context context, java.lang.String cardId)
      Abstract method which should be implemented by application developers to handle transaction start event.
      abstract void handleOnTransactionSubmittedIntent​(android.content.Context context, java.lang.String cardId, MeaContactlessTransactionData data)
      Abstract method which should be implemented by application developers to handle transaction submitted event.
      void onReceive​(android.content.Context context, android.content.Intent intent)  
      • Methods inherited from class android.content.BroadcastReceiver

        abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MeaTransactionReceiver

        public MeaTransactionReceiver()
    • Method Detail

      • onReceive

        public void onReceive​(android.content.Context context,
                              android.content.Intent intent)
        Specified by:
        onReceive in class android.content.BroadcastReceiver
      • handleOnTransactionSubmittedIntent

        public abstract void handleOnTransactionSubmittedIntent​(android.content.Context context,
                                                                java.lang.String cardId,
                                                                @Nullable
                                                                MeaContactlessTransactionData data)
        Abstract method which should be implemented by application developers to handle transaction submitted event.
        Parameters:
        context - The Context
        cardId - Card id used for transaction as String
        data - Represents completed transactions information.
      • handleOnTransactionFailureIntent

        public abstract void handleOnTransactionFailureIntent​(android.content.Context context,
                                                              @Nullable
                                                              java.lang.String cardId,
                                                              MeaError error,
                                                              @Nullable
                                                              MeaContactlessTransactionData data)
        Abstract method which should be implemented by application developers to handle transaction failure event.
        Parameters:
        context - The Context.
        cardId - Card id used for transaction as String.
        error - Transaction failure error.
        data - Transaction data. Object can be null.
      • handleOnAuthenticationRequiredIntent

        public abstract void handleOnAuthenticationRequiredIntent​(android.content.Context context,
                                                                  java.lang.String cardId,
                                                                  @Nullable
                                                                  MeaContactlessTransactionData data)
        Abstract method which should be implemented by application developers to handle authentication required event.
        Parameters:
        context - The Context
        cardId - Card id authentication as String
        data - Represents completed transactions information.
      • handleOnTransactionStartedIntent

        public abstract void handleOnTransactionStartedIntent​(android.content.Context context,
                                                              java.lang.String cardId)
        Abstract method which should be implemented by application developers to handle transaction start event. Usage of this method is optional but highly recommended to improve UX. It allows to start opening Activity showing transaction progress and status before transaction status is received. Therefore transaction itself will look happening faster. It's recommended to make this Activity as lightweight as possible to reduce it's opening time.
        Parameters:
        context - The Context
        cardId - Card id used for transaction as String