I am looking for an Android API, which would return the network mode for Q and above. We do have a way to get network mode by Reflection using getPreferredNetworkType from TelephonyManager class. But as per the android policy, we can't use reflection in android Q and above. So currently searching for an Android API that would return the preferred network mode.
Please let me know if anybody has any idea about it.