[英]Android not caputuring CellId and LocationId of slave sim in dual sim phone
我需要從屬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;
}
//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);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.