- Home /
Get Real GPS not WiFi GPS
Hi!
I figuered out that the Input.location has nothing to do with the built in GPS function of andoid! It is just the position of that last wifi you have been at. Is there a way to access the GPS function of android?
Answer by Troula · Apr 10, 2014 at 08:11 PM
It might me late for an answer but just in case somebody else might look for something like this in the future I would like to add that Input.location.lastdata actually uses the GPS function on android and gives pretty accurate results as well (for the latitude and longtitude at least).
I am using the code that the documendation has with the Input.location to retrieve the information without having wifi or 3g enabled on my phone.
@Troula, Would this kind of thing work on a Stand Alone Player build for either a $$anonymous$$ac or PC car computer?
Answer by tanoshimi · Nov 26, 2013 at 05:02 PM
There's a thorough guide on how to write a plugin to obtain data from the GPS sensor on Android here: http://www.mat-d.com/site/unity-gps-plugin-development-tutorial-building-a-android-plugin-for-unity-with-eclipse-and-ant/