bradboggs avatar image
bradboggs asked ·

Launching my app in the middle of payment flow

I am trying to launch my app mid-payment-flow using a Broadcast receiver which is listening for ACTION_ORDER_CREATED. Is this possible? This statement in the docs make it seem like it is(
" Clover emits broadcasts when important events occur, such as when a new order or payment is created. Your application can register a broadcast receiver in order to listen and respond to these events.
Setting a listener for the ACTION_ORDER_CREATED intent will trigger your app whenever an order is created. Your app will receive the ID for the new order."

As of now, it doesn't launch, and I am not able to see any evidence that the broadcast receiver is receiving anything. Below is my Receiver code and my AndroidManifest.xml. Any advice is appreciated!
public class TransactionReceiver extends BroadcastReceiver {
@Override public void onReceive(Context context, Intent intent) {
String action = intent.getAction(); if (action.equals(Intents.ACTION_ORDER_CREATED)) {
String orderId = intent.getStringExtra(EXTRA_CLOVER_ORDER_ID);
Intent mainIntent = new Intent(context, MainActivity.class);
mainIntent.putExtra("ORDER_ID", orderId);
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
<uses-permission android:name="android.permission.INTERNET"/>
<activity android:name=".MainActivity">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
android:exported="true" >
<action android:name="com.clover.intent.action.ORDER_CREATED" />

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

What device are you testing with? What SDK version are you targeting?

0 Likes 0 · ·
bradboggs avatar image bradboggs Jeffrey Blattman ♦♦ ·

I'm using an emulator: Clover Station 2018, targetSDK 26

0 Likes 0 · ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·
As part of the Android 8.0 (API level 26) Background Execution Limits, apps that target the API level 26 or higher can no longer register broadcast receivers for implicit broadcasts in their manifest.


This includes most of the intents defined in the Clover Android SDK.

Regardless, what you are trying to do is probably not going to work well. Clover starts a host a different activities at different times during the payment flow. There's no guarantee your activity won't be clobbered by the Clover app starting a different activity.

There are several well-defined integration points in the order / payment flow, including custom tenders and order modifications.

1 comment Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Jeffrey Blattman Thanks for your response! That's really helpful info. I went the order modification route, and the integration worked perfectly. Thanks again!
0 Likes 0 · ·

Welcome to the
Clover Developer Community