如何获得的Android手机目前本地code(LAC)? [英] How to obtain the current Local Area Code (LAC) of the handset in Android?
本文介绍了如何获得的Android手机目前本地code(LAC)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
欲获得该手机当前在给loged单元格的当前当地code。
我如何获得这些信息?
I want to obtain the current Local Area Code of the Cell the handset is currently loged in to. How do I get this information?
推荐答案
要获取当前本地code,你必须获得的 TelephonyManager
To get the current Local Area code you have to get a TelephonyManager
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
,那么你可以从一个 GS,CellLocation TelephonyManager。
then you can get a Gs,CellLocation from the TelephonyManager.
GsmCellLocation location = (((GsmCellLocation)tm.getCellLocation());
在GsmCellLocation有一个<一个href=\"http://developer.android.com/reference/android/telephony/gsm/GsmCellLocation.html#getLac%28%29\"相对=nofollow> getLac 方法返回当前LAC。
这篇关于如何获得的Android手机目前本地code(LAC)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文