Android, Kotlin, Network, Broadcast Receiver.
Boolean { val connMgr = getSystemService(Context.LOCATION_SERVICE) as LocationManager return connMgr.isProviderEnabled(LocationManager.GPS_PROVIDER) } With these extensions we can check the GPS and network status. Now we will create a simple class to monitor any changes. Firstly we will create a