From 9f6312581693ace9b736bebeb367b3d81933ee8d Mon Sep 17 00:00:00 2001 From: Jimmy Shih Date: Thu, 23 Aug 2012 14:58:36 -0700 Subject: [PATCH] - In MapView, only show the no gps message when recording. - Different messages for no gps signal and need better gps signal. - Add debug line when location is not inserted due to accuracy issue and min recording distance requirement. --- MyTracks/res/values/strings.xml | 9 +++- .../apps/mytracks/fragments/MapFragment.java | 47 +++++++++++-------- .../services/TrackRecordingService.java | 6 ++- 3 files changed, 38 insertions(+), 24 deletions(-) diff --git a/MyTracks/res/values/strings.xml b/MyTracks/res/values/strings.xml index 6600757f7..0e681478f 100644 --- a/MyTracks/res/values/strings.xml +++ b/MyTracks/res/values/strings.xml @@ -683,12 +683,17 @@ limitations under the License. translation_description="On application start, message when there is no GPS on the device."> No GPS is found on the device. - Waiting for a better GPS signal. Make sure the sky is visible. - + + Waiting for GPS signal. Make sure the sky is visible. + + maxRecordingDistance) { insertLocation(track, lastLocation, lastTrackLocation); Location pause = new Location(LocationManager.GPS_PROVIDER); @@ -873,9 +873,11 @@ public class TrackRecordingService extends Service { private void insertLocation(Track track, Location location, Location lastRecordedLocation) { if (location == null) { + Log.w(TAG, "Ignore insertLocation. loation is null."); return; } if (location.equals(lastRecordedLocation)) { + Log.w(TAG, "Ignore insertLocation. loation same as last recorded location."); return; }