getCurrentIpAddress(): String { val connectivityManager = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager val currentNetwork = connectivityManager.activeNetwork val linkProperties = connectivityManager.getLinkProperties(currentNetwork) return linkProperties?.linkAddresses?.first { it.address is Inet4Address }.toString() }