Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally use the new getAllCellInfo API #72

Closed
hannosch opened this issue Aug 15, 2013 · 5 comments
Closed

Optionally use the new getAllCellInfo API #72

hannosch opened this issue Aug 15, 2013 · 5 comments

Comments

@hannosch
Copy link

Android 4.2 (API level 17) introduced a new API for getting cell information with TelephonyManager.getAllCellInfo() (http://developer.android.com/reference/android/telephony/TelephonyManager.html#getAllCellInfo%28%29).

The new API offers better and more data and supports LTE / WCDMA networks. We have stumbler users on older Android versions, so we shouldn't require the new API, but fall back on the current code.

@hannosch
Copy link
Author

Some observations based on feedback from tialaramex on IRC: on the tested devices (for example a Nexus 4), these API's don't return any more data compared to the old API. There should be some really new devices where they have better / more data, but that's likely a small portion of our users. So this isn't a total easy win, but more of a nice to have for the future.

@tialaramex
Copy link

Whoops, I now see hannosch had mentioned my comment, and I forgot to hit refresh before submitting. Well, here's a more detailed explanation in case it's still useful.

I tried this API on a Nexus 4 running Android 4.3 on the UK's 3 network which is apparently WCDMA. I found that the new API although it did return a Collection as specified (not null, as it would on older hardware) did not offer any information not presented through the API MozStumbler is already using. The additional CellIIdentityWcdma objects had their LAC and CID set to Integer.MAX_VALUE which is the new API's equivalent of setting them to -1 in the old API.

So, at least on this device, network and Android firmware version, it gains nothing and I abandoned work on implementing it in my MozStumbler fork, at least for now.

@dougt
Copy link
Contributor

dougt commented Dec 27, 2013

tialaramex, close ?

illarionov added a commit to illarionov/MozStumbler that referenced this issue Jan 25, 2014
illarionov added a commit to illarionov/MozStumbler that referenced this issue Jan 26, 2014
@illarionov
Copy link
Contributor

I have also implemented this API (#348) and that is my results with Google Nexus 5 (Android 4.4.2).

GSM networks:
getAllCellInfo() returns the same info as getCellInfo( ) + getNeighboringCellInfo(). The signal level (Asu) is slightly differs sometimes.

WCMDA networks:
The results are almost the same as getCellInfo() and getNeighboringCellInfo().
The current cell (CellInfo#isRegistered is true) is always as in getCellInfo().
The other neighboring cells are the same as getNeighboringCellInfo(), but MNC and MCC fields are always set to "unknown", even when in getNeighboringCellInfo() they are correct.
Rarely getCellInfo() returns a lot more cells.

LTE and CDMA networks:
No opportunity to test :( getAllCellInfo() is the only official way to get the LTE measurements. These includes the timing advance field.

I think we can send to the server the results of both of this API's.

@cpeterso
Copy link
Contributor

Sounds great. Thanks for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants