Closed mvglasow closed 10 years ago
Hi,
I wouldn't go for too old versions as the provider is only useful with rooted devices, thus giving users access to rather recent Android anyway... (In your case CM-10.X iirc)
As for the actual request: The most recent method is getAllCellInfo() (iirc) https://developer.android.com/reference/android/telephony/TelephonyManager.html#getAllCellInfo%28%29 That's API level 17, Android 4.2. I guess that would be acceptable? Would you mind testing it if I lower the API level?
API 17 would be fine for me. If you could tag the respective commit so F-Droid can pick it up and build the new release, I will be happy to test it.
API 17 would be great as many phones do not yet have a stable KitKat ROM. For my Really Old Phone (Desire Z has a hardware keyboard but only 512MB ram, thus Android 2.3.3).. I guess I'm just out of luck! Happy to test a new release.
Sorry but I was a bit bussy... https://github.com/rtreffer/LocalGSMLocationProvider/releases/tag/v0.0.1.4 is a 4.2.2 / API 17 build. I've also changed the build system to allow stand alone builds via ant.
Offtopic: I was a huge fan of the Desire Z, but it's simply to unstable for anything past 2.X.... Gsmarena has a nice search... You might try one of those as a replacement: http://tinyurl.com/okqblqs I'm trying to revive my old "galaxy nexus" with some FL/OSS, I'd thus be happy to support old phones, but going back to 2.X looks like a bad option. Rather try to shoot a cheap phone off ebay (~100€), it's a way better option....
The location provider currently requires KitKat (API level 19) as per its manifest. Is there an easy way to make it compatible with earlier API levels? Having done some work in the field myself (https://github.com/mvglasow/satstat), I know recent APIs introduced some new and more powerful methods for querying cells in view, but maybe these can be warpped up in code that queries the actual API level and only makes calls supported on that API version? This might sacrifice some precision on older platforms (as we might not get certain types of cell information), but is still better than no support at all.
As for the API version, I guess a good rule of thumb is to look at the latest stable Cyanogenmod version (being the most widely-used custom ROM and the ROM that supports the greatest number of devices) and support at least that API level. (Which would also scratch my itch.)
About sacrificing precision on ealier platform versions – on some phones this may not even be an issue since on some phones the RIL itself is limited in its capabilities and will not return any cells apart from the one it is currently using (the Nexus S being one example), thus
TelephonyManager.getNetworkOperator()
is sufficient for obtaining all the information the RIL will ever reveal on those devices.