title: How to trigger a JobScheduler when Wifi state changes(connected or disconnected from Network)?
body: <p>I want to run a piece of code when Wifi is connected or disconnected from some router. I can use service and <code>BrodcastReceiver</code> for this but as of Oreo, the service is killed few minutes after the app is closed (unless in foreground). So, I am trying to use <code>JobScheduler</code> for this but I can't figure out what triggers to provide for execution of my Job. </p>