question

tg avatar image
tg asked tg commented

How to get item quantity via Android SDK?

Could you please provide an example on this?

I am able to use InventoryConnector.updateItemStock(...) successfully to update, but Item.hasItemStock() returns false for the same item...

2 comments
10 |2000

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

Mike M avatar image Mike M commented ·

Did you try inventoryConnector.getItem(itemId) after you updated the item stock to refresh your item object?

0 Likes 0 ·
tg avatar image tg commented ·

at this point I can't get the stock even before updating.

Item item = inventoryConnector.getItem(itemId); item.getItemStock(); is giving me null, i tested update to make sure permissions were correct for this app

0 Likes 0 ·

1 Answer

Mike M avatar image
Mike M answered tg commented

After investigating the internal code further, it seems it is currently not possible to query for an item's stock (I guess due to it being a different DB on the device). I have opened an engineering ticket to have this fixed, however for the interim, you will need to do an API request to get the item stock: https://www.clover.com/api_docs#!/inv...

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.

tg avatar image tg commented ·

thanks mike!

0 Likes 0 ·

Welcome to the
Clover Developer Community