Let's say my application receives a push notification from a server that carries an item ID. After receiving the push notification item's details have to be fetched from the server (using retrofit) and after that an Android notification is displayed. This is pretty straightforward when a phone is not idle.
But what happens when, e.g. I lock the phone and keep it that way? After a time the phone goes to sleep. Push notification should be received. But what bugs my mind is the retrofit call. Will the application stay awake till I finish - dispose - the retrofit call or it can be "killed" while handling it? Does it have to do something with so called WakeLock? Or is it a bad way to use retrofit in a first place? I couldn't find any good article or example that will help me understand.