question

blueleaves avatar image
blueleaves asked blueleaves commented

Broadcast/ notifier when the Register Actitivty moves to the background or an Order was created by the Register Activity

Hello, all.

I would like to know if any 1 of these things below are possible:

  • Is it at all possible to receive a broadcast (or in other words "know") if the register app (activity) has been started?
  • Is it at all possible to "know" (be notified through a BroadcastReceiver or whatnot) if the register activity has been minimized/closed (ei... the activity is no longer showing on the screen)?
  • Is it at all possible to "know" if the Register activity was the application where an order has been created (as opposed to other applications that can create orders that may be installed on a merchant's device)?

Any help would be much appreciated. Thanks!

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

Jacob Abrams avatar image
Jacob Abrams answered blueleaves commented

You should try registering a receiver for some of the intents at the bottom of the Intents.java file in the clover-android-sdk: https://github.com/clover/clover-andr...

Specifically try: ACTIONV1ORDERBUILDSTART, ACTIONV1ORDERBUILDSTOP

These aren't guaranteed to be coming from Register app and there isn't a way to know for sure but as far as I can tell no other apps send them. Clover could possibly in the future have another way to build orders and we would likely use these intents there too.

1 comment
10 |2000

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

blueleaves avatar image blueleaves commented ·

Thanks for the info!

So does that mean that if a person were to develop, for example, a register-like app for clover and used OrderConnector to create orders that these two broadcasts would not be sent? (Would the same apply for the com.clover.intent.action.ORDER_CREATED as well?)

0 Likes 0 ·

Welcome to the
Clover Developer Community