Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Cell ID and LAC in CDMA BlackBerry devices (OS5 and greater)

I am stuck on how to get CellID and LAC in CDMA BlackBerry devices supporting OS 5 and greater. I have to get Latitude and Longitude without using GPS. So, i have implemented the solution for GPRS devices, but for CDMA devices i am unable to map CellID and LAC.

I did read many posts on this forum and others saying that CDMA Info provided BID = CellID and NID = LAC, but it never worked at all, and I also tried different combinations for LAC such as using SID as LAC, but it also didn't work.

How can I get Cell ID on OS 5.0+ BlackBerry devices?

like image 769
Ali Imran Avatar asked Sep 09 '25 23:09

Ali Imran


2 Answers

Use getCellInfo() to get both LAC & CellId. Just call the respective methods:

int LAC = GPRSInfo.getCellInfo().getLAC();
int CELLID = GPRSInfo.getCellInfo().getCellId();
like image 86
DPC Avatar answered Sep 12 '25 12:09

DPC


Have you tried this?

int MCC = RadioInfo.getMCC(RadioInfo.getCurrentNetworkIndex());
int MNC = RadioInfo.getMNC(RadioInfo.getCurrentNetworkIndex());
int LAC = GPRSInfo.getCellInfo().getLAC();
int CELLID = GPRSInfo.getCellInfo().getCellId();
like image 23
Vicky Thakor Avatar answered Sep 12 '25 12:09

Vicky Thakor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!