Any Intent or Broadcast receiver when clicked button of sync manually on Inventory app or register app?
We have make an app using clover sdk in which we are applying discount . We are storing inventory data in our local database like price,name etc and afterwards we are using background service,which is updating the order and putting discount when some criteria gets fulfilled on register app.but when vendor or user who have clover device when change the price of particular item from inventory app and sync it from sync button, the price is reflected there in register or inventory app, but how to reflect that same price in our local database, because our app is in
background.So when price gets changed it show discount based on older price and not on new price of
item.So any Intent or Broadcast receiver or any event is there when manually clicking of sync button of Inventory app or register app?
OR Any other solution for this problem?
Inventory can be changed from other devices or directly from the cloud, so hooking in to the refresh button on the local device isn't what you want.
Why can't you just read the current price from Clover's inventory system, whatever it may be, before you use it? It's not clear to me why you want to keep a copy of it.
You can register content observers over the inventory DB, but Android isn't going to allow you to run continuously in the background. I think the best you can do is, when you are triggered, ensure you are synced at that time.