java - cell tower location for CDMA android phone using getBaseStationLatitude()/Longitude() -


i'm developing android app cdma phones gather latitude/longitude of cell tower connected to.

first: possible?

second: i've looked @ previous posts says add "celllocation.requestlocationupdate();" didn't have effect. here's portion of code i'm trying retrieve locations...

cdmacelllocation cdmalocation = (cdmacelllocation)telephonymanager.getcelllocation(); int longitude = cdmalocation.getbasestationlongitude(); int latitude = cdmalocation.getbasestationlatitude(); 

looking @ the code cdmacelllocation class reveals values defaulted integer.max_value, how set latitude , longitude?

you have use phonestatelistener listen_cell_location , corresponding callback function oncelllocationchanged(celllocation) , listen_cell_info callback function oncellinfochanged(list) , possibly listen_signal_strenghts callback onsignalstrengthschanged(signal strength)

to quit getting change notification phonestatelistener use listen_none

http://www.truiton.com/2014/08/android-phonestatelistener-example/

https://developer.android.com/reference/android/telephony/phonestatelistener.html


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -