finishActivity

public final void finishActivity()

Finish the activity setting RESULT_OK with a null payload.

Here's an example of using this method:

  public class CloverLoyaltyCustomActivity extends Activity {
      private CloverCFPLoyaltyHelper cloverCFPLoyaltyHelper;
      ...
      public void onMessage(String payload) {
          // this is a custom message that will finish the activity if a "finish" message is sent
          // by the pos
          if ("finish".equals(payload)) {
              cloverCFPLoyaltyHelper.finishActivity();
          } else {
              ...
          }
      }
      ...
  }

Since

4.1.0