本文整理了Java中android.telephony.TelephonyManager.getNeighboringCellInfo()
方法的一些代码示例,展示了TelephonyManager.getNeighboringCellInfo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TelephonyManager.getNeighboringCellInfo()
方法的具体详情如下:
包路径:android.telephony.TelephonyManager
类名称:TelephonyManager
方法名:getNeighboringCellInfo
暂无
代码示例来源:origin: wangdan/AisenWeiBo
int mnc = Integer.parseInt(operator.substring(3));
List<NeighboringCellInfo> cellInfoList = mTelNet.getNeighboringCellInfo();
代码示例来源:origin: fooock/phone-tracker
@Override
public void run() {
final boolean permEnabled = checkPermission.hasAnyPermission(
PhoneTracker.LOCATION_PERMISSIONS);
final int scanDelay = cellConfiguration.getScanDelay();
if (!permEnabled) {
Log.w(TAG, "Location permissions not granted to cell scan, trying again in "
+ scanDelay + "ms");
handler.postDelayed(this, scanDelay);
return;
}
final List<NeighboringCellInfo> cellInfo
= telephonyManager.getNeighboringCellInfo();
final long timestamp = System.currentTimeMillis();
if (cellInfo == null || cellInfo.isEmpty()) {
cellScanListener.onNeighborCellReceived(
timestamp, Collections.<NeighboringCellInfo>emptyList());
} else {
cellScanListener.onNeighborCellReceived(timestamp, cellInfo);
}
Log.d(TAG, "Scanning cell every " + scanDelay + "ms");
handler.postDelayed(this, scanDelay);
}
});
代码示例来源:origin: stackoverflow.com
List<NeighboringCellInfo> neighCells = tel.getNeighboringCellInfo();
for (int i = 0; i < neighCells.size(); i++) {
try {
代码示例来源:origin: microg/android_external_UnifiedNlpApi
List<NeighboringCellInfo> neighboringCellInfo = telephonyManager.getNeighboringCellInfo();
if (neighboringCellInfo != null) {
for (NeighboringCellInfo info : neighboringCellInfo) {
代码示例来源:origin: n76/DejaVu
final List<NeighboringCellInfo> neighbors = tm.getNeighboringCellInfo();
if ((neighbors != null) && !neighbors.isEmpty()) {
for (NeighboringCellInfo neighbor : neighbors) {
代码示例来源:origin: denzilferreira/aware-client
List<NeighboringCellInfo> neighbors = telephonyManager.getNeighboringCellInfo();
if (neighbors.size() > 0) {
for (NeighboringCellInfo neighbor : neighbors) {
代码示例来源:origin: AlexZhuo/AlxLocationManager
List<NeighboringCellInfo> infos = mTelephonyManager.getNeighboringCellInfo();
if(infos==null){
Log.i("AlexLocation","手机型号不支持基站定位1");
List<NeighboringCellInfo> infos2 = mTelephonyManager.getNeighboringCellInfo();
if(infos2==null || infos2.size()==0){
Log.i("AlexLocation","该手机确实不支持基站定位,已经无能为力了");
代码示例来源:origin: gdpancheng/LoonAndroid3
/**
* 在获取系统信息前初始化
*
* @author gdpancheng@gmail.com 2013-10-22 下午1:14:12
* @return void
*/
public static void init() {
mTm = (TelephonyManager) Ioc.getIoc().getApplication().getSystemService(Context.TELEPHONY_SERVICE);
mIMEI = mTm.getDeviceId();
mMobileVersion = mTm.getDeviceSoftwareVersion();
mCellinfos = mTm.getNeighboringCellInfo();
mNetwrokIso = mTm.getNetworkCountryIso();
mSIM = mTm.getSimSerialNumber();
mDeviceID = getDeviceId();
try {
ConnectivityManager cm = (ConnectivityManager) Ioc.getIoc().getApplication().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = cm.getActiveNetworkInfo();
if (info != null) {
mNetType = info.getTypeName();
}
} catch (Exception ex) {
}
}
代码示例来源:origin: thuryn/your-local-weather
neighboringCells = mTelephonyManager.getNeighboringCellInfo();
} catch (SecurityException securityException) {
appendLog(context, TAG, "SecurityException when getCellLocation is called ", securityException);
代码示例来源:origin: openbmap/radiocells-scanner-android
final ArrayList<CellRecord> neighbors = new ArrayList<>();
final ArrayList<NeighboringCellInfo> neighboringCellInfos = (ArrayList<NeighboringCellInfo>) mTelephonyManager.getNeighboringCellInfo();
内容来源于网络,如有侵权,请联系作者删除!