Yonatan V. Levin
Jul 21, 2017 · 1 min read

Thanks Sudhanshu Gaur :)

Let me reply to you:

First one — Once user create order it’s inserted in DB with status “pending sync”. IntentService is created to sync this order with server. Besides that — there is periodic job that running every 15 minutes using GCMNetworkManager to sync all orders that in status “pending”. So if IntentService was killed, the order will be synced by periodic job using GCMNetworkManager.

Second one — You right — IntentService using single work thread to do it’s work. However in our case, there is no any problem to wait till network request will be finished. The payload is very small and API call will return in most of 3 times retry X 200ms network request timeout = 600ms. So in my case having, it takes more time to use insert new order than network to sync it :)

    Yonatan V. Levin

    Written by

    R&D Team Leader @ monday.com by day, Founder of Android Academy in between