I'm looking for a solution to detect Network Events in my Android project, specifically the Connected and Disconnected Events.
With older Android versions, we were able to listen such events from Broadcast receivers. Work Manager has some constraints to work with but I don't think it fits the mold here because the library doesn't expose the state of the constraints (Network States in this case). Even if it does, 15 minutes limit is gonna be a pain, if the user toggles the internet multiple times during 15 minutes.
Is Job Scheduler good for this situation? Can it detect both Network Connected and Disconnected Events?
For this situation, ConnectivityManager system service is good to detect frequent network changes