Can't get onLocationChanged call when using network method

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Can't get onLocationChanged call when using network method

Postby fountain999 » Tue Apr 06, 2010 9:25 am

I just used followings codes:

LocationManager lm = null;
lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocationUpdates("network", 1000, 0F, this);

But my onLocationChanged function won't be called at all(i'm using CMCC cmnet), following is the log:

D/LocationManager( 1326): Constructor: service = android.location.ILocationManag
er$Stub$Proxy@45bf2368
D/NetworkLocationProvider( 103): addListener(): com.symantec.demo.arbiter
D/NetworkLocationProvider( 103): setMinTime: 1000
D/NetworkLocationProvider( 103): enableLocationTracking(): true
D/NetworkLocationProvider( 103): onCellLocationChanged [4474,4642]
D/LocationMasfClient( 103): getNetworkLocation(): Location not found in cache, making network request
D/DragLayer( 172): touch event action ACTION_DOWN
D/DragLayer( 172): touch event action ACTION_UP
D/ProtoRequestListener( 103): requestFailed()
E/Steven ( 172): /data/misc/AllProgramSlidingLogs_1270537755026

But if I open WIFI connection, then onLocationChanged function can be called as following log:

D/LocationManager( 1563): Constructor: service = android.location.ILocationManag
er$Stub$Proxy@45bf20d0
D/NetworkLocationProvider( 103): addListener(): com.symantec.demo.arbiter
D/NetworkLocationProvider( 103): setMinTime: 1000
D/NetworkLocationProvider( 103): enableLocationTracking(): true
D/WifiService( 103): acquireWifiLockLocked: WifiLock{NetworkLocationProvider ty
pe=2 binder=android.os.Binder@45da5de8}
D/NetworkLocationProvider( 103): onCellLocationChanged [4474,4642]
D/WifiService( 103): enable and start wifi due to updateWifiState
D/NetworkLocationProvider( 103): getLocation(): triggering a wifi scan
I/wpa_supplicant( 1496): CTRL-EVENT-SCAN-RESULTS Ready
D/NetworkLocationProvider( 103): updateWifIScanResults(): 14 APs
D/LocationMasfClient( 103): getNetworkLocation(): Location not found in cache,making network request
W/LocationMasfClient( 103): uploadCollectionReport(): no ReplyElement
D/LocationMasfClient( 103): getNetworkLocation(): Number of prefetched entries 18
D/LocationMasfClient( 103): getNetworkLocation(): Returning network location with accuracy 153.0
D/LocationManagerService( 103): Acquired wakelock
I/My loggggggg( 1563): onLocationChanged............

Why only wifi access point does work, but the cell tower doesn't work? Is onLocationChanged function only called when the location changed?? Should I move the phone out of current cell tower to force it changed manually?
fountain999
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Apr 06, 2010 9:13 am

Top

Return to Map Problems

Who is online

Users browsing this forum: Google [Bot] and 3 guests