How can I detect continuously or by schedule if data connection is available either Wifi or Mobile Data?
I need to detect it even if the app gets in foreground, background, or get killed by the system or user.
I already seen a lot of relevant question and sample code but they say that things have change in Android N and above for security reason.
// Now call the service from Activity
// In Manifest