code: public static Delivery newAlertMail(@NotNull Context ctx, @NotNull CharSequence title, @NotNull CharSequence message,
                                          @NotNull final AlertHandler handler){
  
          // Compose the delivery
          Delivery.Builder builder = newMail(ctx)
                  .setTitle(title)
                  .setMessage(message)
                  .setButton(Dialog.BUTTON_POSITIVE, "Ok", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int which) {
                          dialog.dismiss();
                          handler.onAccept();
                      }
                  })
                  .setButton(Dialog.BUTTON_NEGATIVE, "Cancel", new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int which) {
                          dialog.dismiss();
                          handler.onDecline();
                      }
                  });
  
          // Build the delivery
          return builder.build();
      }
docs: Create an alert dialog 'Mail' delivery that provides the user with a 'Yes' or 'No' choice to
  
  @param ctx       the application context
  @param title     the dialog title
  @param message   the dialog message
  @param handler   the choice handler
  @return          the alert choice handler