0

My app is pinned and after waking up device all network requests that are made right away fail with a connection timeout. Waiting a couple of 100ms or seconds does the trick and everything works normally after that.

I suppose there's a small window of time when wifi is "re-enabled". Whats the best way to detect that event?

Android version 4.4 and wifi sleep is set to "never"

Ljudevit
  • 368
  • 3
  • 11

1 Answers1

0

As Augusto Ferrarini points out you can listen for broadcast and handle it accordingly. There is a chapter about it on developer.android which I'd recommend reading together with the link from Augusto Ferrarini.

Warpzit
  • 27,658
  • 18
  • 103
  • 150