LocationManager: strange behaviour since Gingerbread update on HTC Desire HD
Since I updated my HTC Desire HD to Gingerbread (2.3.3, official update) the LocationManager isn't working correctly anymore. The android-own gps icon is blinking (searching for a fix) and when a fix was founded, the icon disappears. After some seconds the icon is blinking again and disappears again...
The strange thing is that I didn't change anything on my code an that the same code is working as expected on other devices like HTC Desire or Nexus S.
mLocationManager= (LocationManager)getSystemService(Context.LOCATION_SERVICE);
mLocationListener = new MyLocationListener();
// begin with requesting GPS
mLocationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 60000, 10, mLocationListener);
When the location functions are started in my app, I get a huge amount of messages by logcat:
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): addListener(org.myApp)
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): setMinTime 60000
05-15 15:01:47.322: VERBOSE/GpsLocationProvider(1344): enableLocationTracking ++
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): startNavigating
05-15 15:01:47.322: DEBUG/lib_locapi(1344): [GPS:] loc_eng_set_qos_time_out(standalone = 60000, agps = 89000)
05-15 15:01:47.322: VERBOSE/GpsLocationProvider(1344): set_agps_qos_time_out complete
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): android_location_GpsLocationProvider_set_position_mode+
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): GetGpsInterface+
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): GetGpsInterface-
05-15 15:01:47.322: DEBUG/GpsLocationProvider(1344): android_location_GpsLocationProvider_set_position_mode- (get interface sucess)
05-15 15:01:47.322: DEBUG/lib_locapi(1344): [GPS:] loc_eng_set_position mode, client = 1, interval = 1000, mode = 1
05-15 15:01:47.322: VERBOSE/LocationManagerService(1344): requestLocationUpdates
05-15 15:01:47.332: DEBUG/lib_locapi(1344): [GPS:] loc_eng_set_position mode: GPS_POSITION_MODE_MS_BASED
05-15 15:01:47.332: DEBUG/lib_locapi(1344): [GPS:] loc_eng_set_position mode before IOCTL, interval=1000, mode =2 preferred_accuracy=50, qos_timeout_standalone=89000, recurrence_type=2
05-15 15:01:47.332: VERBOSE/l开发者_高级运维ib_locapi(1344): loc_eng_ioctl called: client = 1, ioctl_type = 2
05-15 15:01:47.332: VERBOSE/locapi_rpc_glue(1344): loc_ioctl
05-15 15:01:47.332: DEBUG/RPC(1344): written RPC packet size: [96]
05-15 15:01:47.332: DEBUG/RPC(1344): read RPC packet
05-15 15:01:47.332: DEBUG/RPC(1344): read RPC packet size: [28]
I've tested some other installed apps on the HTC Desire HD like Googles MyTracks and there it is working correctly. So I really don't know why this problem only appears with my app only on a HTC Desire HD.
Thank you for reading and your help!
Best regards, Mike
精彩评论