Reputation: 390
I am trying to write a widget so I can enable/disable LTE on my Verizon Galaxy Nexus without going deep into the settings menu to do so. However, I have yet to figure out how to determine if LTE is actually turned on. I can determine if my phone currently has a LTE signal or an EVDO signal, but not if LTE is enabled when the phone has an EVDO signal.
Does anyone have some suggestions on where to look in the Android Developers Reference? I have tried TelephonyManager & ConnectivityManager but so far neither is working for me.
Upvotes: 7
Views: 5337
Reputation: 9061
See this link : http://developer.android.com/reference/android/telephony/TelephonyManager.html and on this you can find an example : http://developer.android.com/training/efficient-downloads/connectivity_patterns.html
You have to use the following function : TelephonyManager.getNetworkType()
Upvotes: 0
Reputation: 31283
Have you tried this?
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService( Context.TELEPHONY_SERVICE );
boolean isLTEConnected = telephonyManager.getNetworkType() == TelephonyManager.NETWORK_TYPE_LTE;
Upvotes: 0