I couldn't produce this example which iam about to explain, so i post this here to give me more info about it.
Lets say that we want to make an http request to receive a JSON object from a server. We hold no wakelocks nor we make our app a foreground. We make the connections and we wait for our response from server.
What if the device goes to sleep at that very moment (waiting for the JSON object). Do we get the object when the device awakes or we get a timeout exception?
NOTE
Do not involve doze mode in this example. Just that device goes to sleep. Thank you