Skip to content Skip to sidebar Skip to footer

Using A Mock Location In Navigation App

I'm trying to develop an application that will simulate a route through Google's Navigation application. I found some excellent examples of how to implement a mock location provid

Solution 1:

Here is what I was missing:

location.setLatitude(latitude);
location.setLongitude(longitude);
location.setAccuracy(16F);
location.setAltitude(0D);
location.setTime(System.currentTimeMillis());
location.setBearing(0F);

Also, it is important to calcaulte the bearing for navigation. Otherwise, the route updates will be inaccurate.

Post a Comment for "Using A Mock Location In Navigation App"