Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
Contributor
Posts: 10
Registered: ‎12-12-2011
My Device: Developer- 9800, 9780, 9300, 9700, 9105, 9900, 9360
My Carrier: Wind
Accepted Solution

Retrieving tower cell Id

Hello everyone,

 

I am currently testing an app that at some point in time uses the cellId to which the device is attached.. the problem is that I'm not able to get this value in any way.

 

My target OS:  BB10.2  -> Android jellybean (API 17)

My Device:  Z10

 

I have checked the hardware features which are not supported to see if the classes I use are OK ( "NeighbouringCellInfo" is not supported but I suppose this should be treated different than the current cell, am I right? )

 

The two methods I know of with which to retrieve the cell ID are both blocked by returning null values.  *mPhoneManager is the TelephonyManager instance retrieved from the system.

 

1.

 

GsmCellLocation mCurrentCell = (GsmCellLocation) mPhoneManager.getCellLocation();

2.

List<CellInfo> cellInfoList = mPhoneManager.getAllCellInfo();

 both 'mCurrentCell'  and 'cellInfoList' are always returning null.

 

- I have the app permissions in the manifest.

- I have enbled 'location services' on my device (Not sure if this is necessary...)

 

has anyone run into this problem?? or has anybody been able to retrieve the cellID in some other way?

 

My only fear is that in the end this feature is not supported....  but at least in the developer site, it doesn't seems that way

 

thanks for any advice or suggestion anyone can give!

 

cheers

 

 

 

 

Retired
Posts: 140
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Retrieving tower cell Id

[ Edited ]

This is not supported.

 

Maybe not in the most intuitive spot for this, but it's documented here:

 

http://developer.blackberry.com/android/apisupport/unsupported_api_jellybean_hardware.html

 

(edit: Er, I thougth this was on the unsupported page.  It should be.  I know for a fact it's not supported.  Sorry).

Retired
Posts: 140
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: Retrieving tower cell Id

And since there appears to be an exposed API for this for BB10 native, I will look into adding this to our list of supported APIs for the future (no commitment guarantee, but it won't be 10.2.1 Smiley Happy)

Contributor
Posts: 10
Registered: ‎12-12-2011
My Device: Developer- 9800, 9780, 9300, 9700, 9105, 9900, 9360
My Carrier: Wind

Re: Retrieving tower cell Id

thanks bbenninger for the info!!!

 

I had been trough the unsupported API's page, and since in the telephony manager section it's only 'NeighbouringCellInfo' that is listed, I was hoping that the current CellInfo was available. Smiley Happy

 

I guess native is the way to go for now!!