Android 3G/2G control API?
On Android settings, under Wireless controls->Mobile networks there is a setting "Use only 2G networ开发者_StackOverflowks".
In the Android SDK reference, under android.telephony.TelephonyManager
, there doesn't seem to be anything to control the network type.
What APIs does this setting actually call?
It appears to call com.android.internal.telephony.Phone.setPreferredNetworkType()
. Since it is "internal", it isn't available to applications via the SDK.
See:
https://android.googlesource.com/platform/packages/apps/Phone/+/master/src/com/android/phone/Use2GOnlyCheckBoxPreference.java
精彩评论