public static int getCellStatus(Context c){
int z = 0;
try {
TelephonyManager tm = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);
List<CellInfo> cellInfoList = tm.getAllCellInfo();
//This means cell is off
if (cellInfoList.isEmpty()) {
z = 1;
}
return z;
} catch(SecurityException e){
Log.e("RadioControl","Unable to get Location Permission",e);
}
return z;
}
Utilities.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:RadioControl
作者:
评论列表
文章目录