android - Location Manager saying location changed when it has not -
i have service runs in background watches location changes , plot "route" on map.
the problem when @ route on map shows in locations stopped period of time (a few minutes) location jumping around location , not stationary route looks bad.
is there way stop have nice continuous path?
i tried changing minimum distance between location updates not seem anything
locationmanager = (locationmanager) this.getsystemservice(location_service); criteria criteria = new criteria(); criteria.setaccuracy(criteria.accuracy_fine); string provider = locationmanager.getbestprovider(criteria, true); if(provider == null){ provider = locationmanager.network_provider; } locationmanager.requestlocationupdates(provider,25000,50, this);
the problem not code it's satelite , gps accuracy. can't show exact location. need make (if location changed below 5 meters don't notify me).
update
also can use location.getspeed(); speed device moving can define if location changed reliable or not. if there little glitch in satelite or gps accuracy device move 3480834 km/h or that.
Comments
Post a Comment