question

samuel avatar image
samuel asked samuel answered

Android broadcast receiver not receiving PAYMENT_PROCESSED broadcast

I am listening for the PAYMENT_PROCESSED broadcast within my AndroidManifest.xml


<receiver android:name=".activities.ProcessPayment">
  <intent-filter>
    <action android:name="clover.intent.action.PAYMENT_PROCESSED" />
  </intent-filter>
</receiver>

and receiving it with this code


public class ProcessPayment extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    Log.v("Process Payment","Process Payment AOEUEOAOEU");
  }

}

I don't receive the broadcast when I complete the order on either the emulator or the DevKit


When I manually fire the broadcast

adb -s emulator-5554 shell am broadcast -a clover.intent.action.PAYMENT_PROCESSED

I do receive the broadcast

Clover Android SDKBroadcasts
10 |2000

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

1 Answer

·
samuel avatar image
samuel answered

The problem is that for PAYMENT_PROCESSED the name is "com.clover.intent.action.PAYMENT_PROCESSED" unlike some of the other ones (eg. REFUND) that are just "clover.intent.action.XXXXXX"

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community