We are using InventoryConnector
from the SDK to get inventory items. Calling getItems()
should return all items in the inventory.
But this happened to couple of our customers, who have few hundred items it their inventory:
Non-fatal Exception: android.os.TransactionTooLargeException
at android.os.BinderProxy.transact(Binder.java)
at com.clover.sdk.v3.inventory.IInventoryService$Stub$Proxy.getItems(IInventoryService.java:1652)
at com.clover.sdk.v3.inventory.InventoryConnector$1.call(InventoryConnector.java:53)
at com.clover.sdk.v3.inventory.InventoryConnector$1.call(InventoryConnector.java:51)
at com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:208)
at com.clover.sdk.v3.inventory.InventoryConnector.getItems(InventoryConnector.java:51)
at com.loyalloops.clover.cloverapp.fragments.ProgramListFragment$GetInventoryTask.doInBackground(ProgramListFragment.java:455)
at com.loyalloops.clover.cloverapp.fragments.ProgramListFragment$GetInventoryTask.doInBackground(ProgramListFragment.java:433)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
We switched to calling API manually to avoid this, but my question here is - why is SDK failing with such a basic task?
I see no customization options for the InventoryConnector.getItems()
request, to increase the limit or set an offset, like you can in the API request. This happens for us with the inventory, but I can see how CustomerConnector
will have the same issue, as number of customers can go up to several thousand.