How do I write an Android application that tracks your location with a precision to apartment number and floor?
Asked
Active
Viewed 67 times
-5
-
https://stackoverflow.com/questions/17591147/how-to-get-current-location-in-android – Sivakumar S Feb 01 '18 at 13:54
-
https://stackoverflow.com/questions/12336463/can-be-located-which-floor-we-are-via-smart-phone-gps – Sivakumar S Feb 01 '18 at 13:54
-
2Try to search in Google for it: https://www.google.bg/search?q=track+location+android+tutorial&oq=track+location+android+tutorial&aqs=chrome..69i57j0.9331j0j7&sourceid=chrome&ie=UTF-8 – Gabriella Angelova Feb 01 '18 at 13:54
1 Answers
0
You can use Maps api, firstly to get the location and then use altitude with some conditions. Like `if (altitude <15) { Log.i ("floor", "ground floor") }. However, it will not be very accurate as different building has different floor heights. And I Don't think you can get appartment number unless user enters the apartment number.
Other but complicated approach which i 'm not sure is feasible or not, could be.... Let say there is build "x" and you want to get its details. So first get the latitude and longitude of the building "x" then check other registered users location narrow it down to location of "x" and calculate altitude differences between registered users.

notakoba
- 160
- 1
- 13