0

CellID & LocationAreaCode always return zero on my device:

Sample Code:

    int cellId = bb::device::CellularNetworkInfo().cellId();
    int LAC = bb::device::CellularNetworkInfo().locationAreaCode();

The above will ALWAYS be zero

Strangely signal strength does return a valid value (eg -90):

Sample Code:

    int signalStrength = bb::device::CellularNetworkInfo().signalStrength();

I am on a GSM network, but just for interests sake I tried networkId & systemId and they still returned zero

Extra Info:
I have #include bb/device/CellularNetworkInfo in the hpp
In my pro file I added: LIBS += -lbbdevice
The device is connected to the network (can make calls etc)
I have ticked all the permissions in the bar-descriptor
I used this as a reference

Has anyone got values for CellID & LAC?
Where am I going wrong?

Thanks in advance

iamanyone
  • 429
  • 2
  • 10

2 Answers2

1

Cite:

Identifier for the geographic region which contains the base station serving the GSM/UMTS network. Permissions: The application must have the read_radio_modem_data permission to access this information.

Adding this to your bar-descriptor.xml will solve this issue:

<permission>read_radio_modem_data</permission> 
p.s.w.g
  • 146,324
  • 30
  • 291
  • 331
Tom
  • 26
  • 1
0

Last extra-Info: Did you check the required authorization in the app descriptor file?

Benoit
  • 1,922
  • 16
  • 25
  • Thanks for your reply. Yes I have ticked all the permissions in the bar descriptor. – iamanyone Mar 26 '13 at 09:37
  • Could you download the geolocation sample from github, and test it inside an buiding (no GPS) and without Wifi to force the cell-Id location. Just to know if the device fails to retrieve the cell-Id, or it just if it fails to provide the cell-id to your app. – Benoit Mar 26 '13 at 17:58
  • Hi Hithredin, The geolocation works in a building(no GPS) and with out wifi. Also to note, when I open blackberry maps, the accuracy is way out (a sign that it is starts to get a network fix, and then the more accurate gps fix kicks in)... so it appears to be my app/api problem... Have any one else got a cell id? – iamanyone Apr 10 '13 at 12:43