Add ability to retrieve GSM Cell ID in Cellular
Brad Jones
It would be nice to be able to fall back (or use as a primary source) the CellID of a GSM/cellular connection for geolocation; there are databases such as https://wiki.opencellid.org/wiki/What_is_OpenCellID which provide this kind of coarse lookup. Not sure what the specific permissions may be for both platforms, however, and if that would raise some of the similar considerations as to the (rightly closed) feature request to retrieve the subscriber number.
Michael Wood
At least on Android 9 it doesn't look like you need location permissions to read the CID. I have a couple of apps installed that show the CID and they both stop showing that info if I turn off location permission. Not sure about iOS.
This might be a good opportunity to write a simple module using the Expo Modules API which has recently come out of beta :)
https://developer.android.com/reference/android/telephony/CellIdentityGsm#getCid()
For iOS, there's some indication that this might not be possible, or might only be possible with private APIs (which will not be allowed on the App Store). If it does work it seems you'll need an entitlement:
https://stackoverflow.com/a/19400475/495319
I also saw the following mentioned somewhere:
"IMPORTANT If you search the ’net you’ll find lots of information about Core Telephony private APIs. Don’t go down that path. Regardless of App Review issues, sometime during the 8.x life cycle the sandbox was enhanced to block all of these private APIs."
Brad Jones
Michael Wood: Interesting, thanks. At the very least it seems like this isn't particularly friendly to a cross-platform solution. Appreciate the info and research.