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


  1. <receiver android:name=".activities.ProcessPayment">
  2. <intent-filter>
  3. <action android:name="clover.intent.action.PAYMENT_PROCESSED" />
  4. </intent-filter>
  5. </receiver>

and receiving it with this code


  1. public class ProcessPayment extends BroadcastReceiver {
  2.  
  3. @Override
  4. public void onReceive(Context context, Intent intent) {
  5. Log.v("Process Payment","Process Payment AOEUEOAOEU");
  6. }
  7.  
  8. }

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


When I manually fire the broadcast

  1. 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

HTML Editor


Add some details...
Characters : 0
Tab to the formatting toolbar with Alt/Option + F10. If inside toolbar, press ESC to return to editor. 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