Abhishek
Abhishek

Reputation: 95

How to change coordinates value in android?

I am developing an app which takes users current location and make changes in the coordinates. I am simply trying to fake users current location but i don't know how should i change coordinates. can i simply just add some value to the latitude and longitude like this:

newlongitude=currentlongitude+0.01000;

Upvotes: 1

Views: 575

Answers (1)

Martin Sch
Martin Sch

Reputation: 64

You can only emulate a new location. Basically you have to pass the values of the new location to Location instance and set Manager Location with Location instance.

I think this can help you:

Access Mock Location

Use Mock Location in App

Upvotes: 2

Related Questions