Updated on 2026-08-14
This commit is contained in:
parent
2af8d5dc82
commit
9d36a97fd9
8 changed files with 67 additions and 34 deletions
|
|
@ -41,7 +41,7 @@ object UtilHelper {
|
|||
val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
|
||||
val netInfo: NetworkInfo?
|
||||
netInfo = cm.activeNetworkInfo
|
||||
netInfo != null && netInfo.isConnectedOrConnecting
|
||||
netInfo != null && netInfo.isConnected
|
||||
} catch (e: NullPointerException) {
|
||||
e.printStackTrace()
|
||||
false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue