bloyal avatar image
bloyal asked Jeffrey Blattman commented

Does the ORDER_CREATED get broadcasted when the register app starts up?

I have been using the ORDER_CREATED intent to hook into the register app and launch my app screen at the beginning of each order. This worked fine until recently, when something changed that caused my app to not be launched when first opening the register app.

I have a receiver registered to the in the manifest as follows:

        <action android:name="com.clover.intent.action.ORDER_CREATED" />

I found that when an order is completed and I press done on the register, the register resets with a new order and my receiver is called as expected, meaning the only time that the receiver does not get called is when the register app is either not running and is launched, or is in the background and is reopened to a new order.

Is this intent no longer being used on the initial start up of the register, if not is there a different intent I should be looking for?

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered Jeffrey Blattman commented

Yes there was a change to have Register re-use an existing an empty order from a previous session if there was one.

That intent means an order was created and nothing else. Sounds like you want to know when the Register app is launched. If you could describe why you need to know that we might be able to suggest an alternative. Apps generally don't get to know when other apps start / run.

There's also the issue that orders can be created by other apps not just Register so if you are using ORDER_CREATED your app can be tricked into thinking Register started.

10 |2000

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

bloyal avatar image bloyal commented ·

Thanks for the explanation.

The reason we are hoping to know that is because we have a screen on our app that modifies the order that we have initially been showing when an order starts. This screen allows the user of our app to do things like set a customer to the order by either searching customers or signing up a new customer as well as adding coupons to the order.

If you need more specific information about what we are doing to give a suggestion let me know.


0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ bloyal commented ·

Yeah I get your use case and that makes sense. Could you use ACTION_ACTIVE_REGISTER_ORDER in place of that? It should be broadcast every time Register is brought to the foreground, and again when it is moved to background but with a null order ID then.

0 Likes 0 ·
bloyal avatar image bloyal Jeffrey Blattman ♦♦ commented ·

Thanks so much Jeffrey, that was very helpful and got things working again for us!

Is there somewhere where changes with Clover apps are documented so I can see what has changed that might impact my app?

0 Likes 0 ·
Show more comments

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