I made a simple aplication that verifies every 5 secounds the current latitude and longitude of the device, using GPS, through a LocationListener.
I want my aplication to act like a real GPS, I mean, the map will be centered in the device location with a simple marker pointing it, wich I already achived, but on a real-life sittuation when you hold your device in your car, getting lat and loc from both GPS and network service to a better accurary, it might locate you “off-road” and I want the pointer to be on road everytime…
I have searched around but I don’t have any idea of what methods to use to achive that, the only thing I tryed was changing the isRouteDisplayed() method of the MapView class to return TRUE, but didn’t seem to work.
I would recommend you to take a look to this article on the android documentation that explains how to use Location services correctly.
It even provides the code to know if a new location is “better” than an old one, based on the accuracy, the provider, and the last time the location was updated, so you don’t get out of the road when a Network Location update is dispatched right after a gps update.