skip to Main Content

Android Studio – How to check for Internet Connectivity on API 30 or higher?

I want to check Internet connection using Network Capabilities but it is giving me this error: Must be one of: NetworkCapabilities.NET_CAPABILITY_MMS, NetworkCapabilities.NET_CAPABILITY_SUPL, NetworkCapabilities.NET_CAPABILITY_DUN, NetworkCapabilities.NET_CAPABILITY_FOTA, NetworkCapabilities.NET_CAPABILITY_IMS, NetworkCapabilities.NET_CAPABILITY_CBS, NetworkCapabilities.NET_CAPABILITY_WIFI_P2P, NetworkCapabilities.NET_CAPABILITY_IA, NetworkCapabilities.NET_CAPABILITY_RCS, NetworkCapabilities.NET_CAPABILITY_XCAP, NetworkCapabilities.NET_CAPABILITY_EIMS, NetworkCapabilities.NET_CAPABILITY_NOT_METERED, NetworkCapabilities.NET_CAPABILITY_INTERNET, NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED, NetworkCapabilities.NET_CAPABILITY_TRUSTED, NetworkCapabilities.NET_CAPABILITY_NOT_VPN, NetworkCapabilities.NET_CAPABILITY_VALIDATED, NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL, NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING, NetworkCapabilities.NET_CAPABILITY_FOREGROUND,…

VIEW QUESTION

Json manipulation and conversion in Java

I have an input json like: { "Employee": [ { "employee1.id": 1 }, { "employee1.name": "John" }, { "employee1.address.street": "main street" }, { "employee1.address.pin": "123456" }, { "employee2.id": 2 }, { "employee2.name": "Mike" }, { "employee2.address.street": "51 street" }, {…

VIEW QUESTION
Back To Top
Search