question

thejoelrf avatar image
thejoelrf asked thejoelrf answered

Handling ACTION_PAYMENT_PROCESSED on Flex 2

Our app listens to the ACTION_PAYMENT_PROCESSED intent to complete certain actions, using a broadcast receiver. It works as expected, except on the Flex 2.

On this device we get this error:

W/BroadcastQueue: Background execution not allowed: receiving Intent { act=com.clover.intent.action.PAYMENT_PROCESSED flg=0x10 (has extras) } 

What is the proper way to handle this intent on this device ?

PaymentsIntentsBroadcasts
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

·
thejoelrf avatar image
thejoelrf answered

Answering my own question, since I found a solution. Register the receiver via code instead of defining it via manifest

@Override
public void onCreate() {
    receiver = new IntentReceiver();
    this.registerReceiver(receiver, new IntentFilter("com.clover.intent.action.PAYMENT_PROCESSED"));
}
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