damonkohler / sl4a

SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.
Apache License 2.0
2.43k stars 800 forks source link

getCellLocation() and getNeighboringCellInfo() return {} and [] in case of CDMA #103

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

What device(s) are you experiencing the problem on?

Motorola Android

What firmware version are you running on the device?

android 2.2.3 baseband C_01.43.01P kernel 2.8.32.9-g68eeef5 android-build@apa26 
#1 Build number FRK76

What steps will reproduce the problem?

1.in ASE use droid.getCellLocation() or droid.getNeighboringCellInfo()
2.using droid.StartTrackingPhoneState() before does not solve the problem
3.

What is the expected output? What do you see instead?

expect to see map with information about cell connected to (such as MCCMNC, 
psc, LAC, CID for GSM -- or -- MCC, SID, LAC, BID in case of CDMA
see instead {} for getCellLocation() and 
see [] for getNeighboringCellInfo()

What version of the product are you using? On what operating system?

sl4a_r5x.apk (and earlier)  Also, I am on Verizon Wireless, so this is CDMA 
rather than GSM (I don't know if it works for GSM)

Please provide any additional information below.

(1) getNeighboringCellInfo() may return [] because this information is perhaps 
not available in CDMA, but
(2) getCellLocation() should return valid cellID information
However, seems to me you need to first to something like
mTelephonyManager.listen(mPhoneStateListener, 
PhoneStateListener.LISTEN_CELL_LOCATION) to generate the events?
I looked in 
http://code.google.com/p/android-scripting/source/browse/android/Common/src/com/
googlecode/android_scripting/facade/PhoneFacade.java
and see that startTrackingPhoneState() does something similar but only for the 
phone call state mTelephonyManager.listen(mPhoneStateListener, 
PhoneStateListener.LISTEN_CALL_STATE);

Original issue reported on code.google.com by bkph...@gmail.com on 14 Mar 2012 at 12:38

Copied from original issue: damonkohler/android-scripting#612