Will android automatically reconnect available WIFI after wake-up with an sceduled alarm?

StackOverflow https://stackoverflow.com/questions/20111591

  •  03-08-2022
  •  | 
  •  

문제

  1. I am aware of WifiManager.WifiLock such thing. I don't have to use it, because I don't need persistent wifi connection. Instead, I just need to try wifi connection every, say 30 min.

  2. I registered a CONNECTIVITY_CHANGE listener. If I set a scheduled wake-up alarm with 30 min interval. After wake-up, will android automatically reconnect available WIFI, so my CONNECTIVITY_CHANGE listener can hear it?

도움이 되었습니까?

해결책

Yes, it should. Whether it has to 'reconnect' or not depends on the wifi sleep settings: by default it will remain connected even in sleep.

But if it has disconnected due to that setting, then it will reconnect when the device awakes, assuming that wifi is enabled, of course.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top