Hello Folks,
We are facing an issue of delay while opening auto-popup from our application while we receive events for "V1_PAY_BUILD_START" from the Broadcast receiver. Our auto-popup displays after some sort of time in the payment screen while our merchant-facing device is connected to the customer-facing screen.
We want our auto-popup display as soon as the Clover payment screen displays on the merchant-facing devices. We have enabled a setting for "Automatically take payment on Connected Device" in our device in which we are taking payment through a connected customer-facing screen.
In this specific scenario, we are facing a delay in opening auto-popup. And we are opening auto-popup while we are receiving events for "V1_PAY_BUILD_START".
Can you please suggest how can we display auto-popup as soon as possible while we are opening the payment screen in our merchant-facing device and we are taking payment through customer-facing?
Here is the chunk of code we are using to open auto-popup from our application.
if (intent.getAction().equalsIgnoreCase("clover.intent.action.V1_PAY_BUILD_START")) { StringBuilder sb = new StringBuilder(); sb.append("Action: " + intent.getAction() + "\n"); sb.append("URI: " + intent.toUri(Intent.URI_INTENT_SCHEME).toString() + "\n"); String log = sb.toString(); Log.d(TAG, log); LogM.v("Action : " + intent.getAction()); Pref.setValue(context, "changeAmount", "0.0"); Pref.setValue(context, "lastDiscountAmount", "0.0"); String aorderID = intent.getStringExtra(Intents.EXTRA_ORDER_ID); Log.d("mk", "Order ID 0=" + aorderID); try { Intent in = new Intent(context, ChooserActivity.class) .putExtra(Intents.EXTRA_ORDER_ID, aorderID) .putExtra(Intents.EXTRA_AMOUNT, amt) .putExtra("from", "1") .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(in); Pref.setValueboolean(context, "already_open", true); } catch (Exception e) { } }
Is there anything we can improve over here?
Any help in this will be helpful.
Here, we are attaching an image of the setting we have applied to take payment on the customer-facing screen
Regards,