question

Mohit Kanada avatar image
Mohit Kanada asked ·

Is there any way to get event when any line item is updated / modifier is added to line item using clover android SDK

Is there any way to get event when any line item is updated / modifier is added to line item using clover android SDK

I can get events for other events like order added, line item added using broadcast receiver. I there any broadcast receiver or any other thing in android SDK using which app can notify once any line item is updated OR modifier is added to line item while building order inside clover register app
OrdersClover Android SDKLineItemsBroadcasts
2 comments
10 |2000 characters needed characters left characters exceeded

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

More details :
Can we receive update/data when Register ‘Done’ button for line item add is actioned ?

that Modifier was added to line item just entered,

Or that Quantity was decreased for line item just entered

0 Likes 0 · ·

The first two can be done with the OrderV3Connector.OnOrderUpdateListener. However, there isn't a listener for the stock of an item being decremented at this time.

Can you explain your use case for listening for the stock decrementing? Perhaps we can work toward an alternative solution.

0 Likes 0 · ·

1 Answer

zgreathouse avatar image
zgreathouse answered ·
Yes, you want to use the OrderV3Connector.OnOrderUpdateListener. Set up the listener in your application as a service. You can listen for what you listed above and in your other post. (LineItem added, Modification applied to a LineItem, LineItem updated, Order deleted...etc)
3 comments Share
10 |2000 characters needed characters left characters exceeded

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

Thanks. Its worked. Now from my requirement just one event is missing here in OnOrderUpdateListner and that is "Line Item Modifier Delete event". Is there any way to get it ?

0 Likes 0 · ·

There is not a method within the OnOrderUpdateListener class which accounts for the event of removing a modification from a lineItem at this time. If you would like I can put in a feature request, however cannot guarantee if or how soon this method would be available.

What is the use case for listening for when a modification is removed? Perhaps we can figure something else out.

0 Likes 0 · ·

Hi Mohit ,

how did you called OrderV3Connector.OnOrderUpdateListener2 in your application. Can you please post code here, we tried it in our application by calling it in service but unable to listen events.

0 Likes 0 · ·

Welcome to the
Clover Developer Community