我需要从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;
}发布于 2016-04-24 16:28:35
//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);
}https://stackoverflow.com/questions/24781627
复制相似问题