Hi,
I am facing an issue with Sale request via Payment connector with the following code:
SaleRequest request = new SaleRequest(); request.setExternalId(ExternalIdUtils.generateNewID());
request.setAmount(paymentAmount);
request.setOrderId(mOrderId);
request.setCardEntryMethods(Intents.CARD_ENTRY_METHOD_ALL);
request.setTipAmount(DEFAULT_TIP);
request.setTipMode(TipMode.TIP_PROVIDED);
request.setDisablePrinting(true);
request.setDisableReceiptSelection(true); //I want to open my receipt selection screen thats why we are disabling it.
request.setDisableDuplicateChecking(true);
mPaymentConnector.sale(request);
I want to start own receipt selection screen via Intent. So when we start own activity: onSaleResponse(final SaleResponse response){
//Start own activity
}
It throughs following exception:
java.lang.IllegalStateException: App switches blocked when starting Intent
If we start own activity after 10 seconds of response, it works fine. But we don't want to show own receipt section screen after 10 seconds, I want to show immediately.
Please suggest us the solution for it.
I am using the following dependencies:
implementation group: 'com.clover.sdk', name: 'clover-android-sdk', version: '215'implementation group: 'com.clover.sdk', name: 'clover-android-connector-sdk', version: '215'