[OutSystems UI] GetNetworkType returns "unknown" on Android 11
Forge component by OutSystems R&D
Application Type


After recently upgrading to Android 11 (OneUI 3.0 Samsung 10e) I noticed a changed output on the GetNetworkType action in OutSystemsUI. This now always returns value "unknown" instead of other values. 

I've tried to see if it was caused by a new webview version, but an Android 10 device with the same webview version did not have any issues (webview v88).

Are others able to reproduce this on an Android 11 device?

If you are running older versions of OutSystemsUI, this could also impact the behaviour of GetNetworkStatus, since formerly it made use of the output of GetNetworkType. For me this was the case and it caused a bug in a production app, because the networkstate was always evaluated as offline on Android 11. 



Hi Rob,

I have tested it in Android Studio (Android R, API Level 30 Rev 3) and it works in different simulated devices. GetNetworkType action returns the expected value. However, I am not clear if in real Android 11 device will work. I think the problem is that this method was deprecated in API level 30 (Android 11) (https://developer.android.com/reference/android/telephony/TelephonyManager#getNetworkType()). 

I haven't been able to verify if the cordova plugin (cordova-plugin-network-information@2.0.2) is taking it into account and it reports the correct values. So I dont' have more information about this :-(

Kind regards, David.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.