我需要奴隶SIM卡的cell id
和location id
;但它总是返回0并且我的主插槽sim不存在。我该如何正确使用它?顺便说一句,我已经正确检查SIM
是否存在。
我的代码是:
final GsmCellLocation locationG = (GsmCellLocation) tel.getCellLocation();
if (locationG != null)
{
cellId = locationG.getCid();
lac = locationG.getLac();
cellId = cellId & 0xffff;
}
答案 0 :(得分:-1)
//you need to check if 2G or 3G
lac = String.valueOf(finalLocation.getLac());
cellId = String.valueOf(finalLocation.getCid());
if(3G) {
cellId= String.valueOf( Integer.valueOf( cellId)& 0xffff);
lac= String.valueOf( Integer.valueOf( lac)& 0xffff);
}