We have make an app using clover sdk in which we are applying discount . We have a background service in that app, that is updating the order and we are removing discount and putting order level discount again when some criteria gets fulfilled on register app, using below method of clover sdk:-
Order ord = orderConnector.getOrder(orderID); ID.add(ord.getDiscounts().get(i).getId()); orderConnector.deleteDiscounts(orderID, ID);
but sometime it show binding exception on first line. and take delay in showing discount on dashboard of register app I have already connected orderconnector and discount is applied on order level using below method:-
orderConnector.addDiscount(orderID,discount);
Is these exception came only in emulator and not in real device?
Because I am testing on emulator and all apps are updated of emulator and I have emulated and tested on both clover mini emulators first and second generation.but same below exception repeated.
Exception is as shown:-
I/ServiceConnector: waitForConnection result: true, retryCount: 0 I/ServiceConnector: waitForConnection result: true, retryCount: 1 I/ServiceConnector: waitForConnection result: true, retryCount: 2 com.clover.sdk.v1.BindingException: Could not bind to Android service at com.clover.sdk.v1.ServiceConnector.waitForConnection(ServiceConnector.java:199 at com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:245) at com.clover.sdk.v3.order.OrderV31Connector.getOrder(OrderV31Connector.java:204) at ai.predictivemarketing.volumediscount.service.CalculationService$AddDiscountAsyncTask_2$2.execute(CalculationService.java:1267) at io.realm.Realm.executeTransaction(Realm.java:1493) at ai.predictivemarketing.volumediscount.service.CalculationService$AddDiscountAsyncTask_2.doInBackground(CalculationService.java:1038) at ai.predictivemarketing.volumediscount.service.CalculationService$AddDiscountAsyncTask_2.doInBackground(CalculationService.java:916) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)