I am new to Android development and want to build a first sample application. My goal is to build a tracking application which sends my current location to a remote server. I want to use the collected data to calculate how many hours I spend in well known places like home or work.
Which approach should I use? I think it will be sufficient to use the information of present WLANs to get a good idea about the current location I am at. All the places I am interested in have WLAN with a static SSID. Are there any frameworks I should use or is there a better approach to what I am trying to do? GPS is not a real option, because the most interesting places are indoors and I have no GPS connection there.
I am working on Android 4.0.
As you say, GPS connection doesn`t work indoor, but it is very useful to estimate your current position. How? You could use the function getLastKnownLocation(best) that provides the LocationManager.
If you want to do it by yourself, you could try to get the last position by GPS, to locate a big area, and use the WLANs to estimate it with more accuracy, using the smaller group of radius with your interesting places.
You might want to read the Making Your App Location Aware training guide on the Android developer site. There's also an included sample application.
I actually am working on a similar project. Here is my code for location tracking on android; check it out. It tracks user's location regularly, uses Network location while indoor, and GPS when it could have a fix. It should give you a quick start.
Related
I have a service, from which I get the user's location on an interval of time (e.g. 7 seconds). The walking path is displayed on the map, but as you can see there're many invalid locations, since the GPS receiver is trying to obtain the exact current position.
The blue one is the displayed walking path and the black one is the actual walked. I was thinking of using the IMU as kind of a filter in order to check whether the retrieved location is on the path, or the location provider needs more time to update it.
Is it possible doing it in this way?
Yes in theory its possible to improve the GPS position with an IMU, but it requires a Kalman-Filter, which is not trivial to set up correctly and get it working correctly on range of devices. There lots of resources on the internet explaining how a Kalman-Filter works and what it can be used for.
I also recommend reading this blog post: https://blog.maddevs.io/reduce-gps-data-error-on-android-with-kalman-filter-and-accelerometer-43594faed19c . The authors pretty much wanted to achieve the same thing as you by using a Kalman-Filter. They also published a library on github for a Kalman-based location estimation.
I would like to build an app that uses GPS coordinates and then Augments the phone's camera with a straight line to a friends' GPS location and modifies the line graphics accordingly in real-time based on the users' movements.
I'm confused about what to use in order to create it- I've googled for buzz words like Unity, ARkit and python for Android....but I can't really understand what to use and how?
If I do need a server- what service should I use? this one?https://console.firebase.google.com/u/0/?pli=1
and on which platform should I write the app? Unity?
I've seen answers like: Real time sharing of GPS location but all these answers were received quite a long time ago.
Thanks in advance
Unity is the easiest to get started with. You likely won't even need to make use of any AR engines outside of just accessing the camera. You'll just need to know which direction the phone is facing.
You'll need a database to store a user ID and GPS location at minimum.
GPS can be accessed in Unity using Input.location.
Keep in mind that GPS is currently accurate to ~5-10 metres, so at close range your line may be a little off the other device.
I have a location-based app and I want to test it without really moving.
I know I can provide a kml file of points but I don't want to use an emulator, but a real device.
could you tell me what is the best way to simulate driving a route on the device?
I emphasize that I need to simulate an entire route with each detail like the exact speed at each point... etc
thank you for giving your time
You can use Mock Location to perform real-time tracking just put source and destination in the mock location app.
For using mock location app you have to enable the Allow mock location from developer option. Check this.
I'm developing an app on Ionic 2 and I would like to implement a restriction where a certain functionally can only be used if the user is GPS located on a location, or within a range, I have set on my database. For example: The user can click on the item only if he is at X. I am recently new to Ionic 2 and how GPS validation work.
What would be the best approach to accomplish this restriction?
What you're trying to accomplish is called "geofencing".
Generally, your application will obtain a location and then check if the coordinates of the last known location are withing a set of predefined regions, usually in a radius around some other coordintate.
Some mobile sdks provide implementation for geofencing, however since you are using ionic2 you may have to look into cordova implementations.
Luckly enough, someone put an example of geofencing with ionic2 and you should definetly take a look.
I want to build a prototype app that allows users to rope off a building such that when others open the app in that roped off area they can be located to that building without fail. Current geolocation services have many toss up scenarios that fail widely in many cases.
What could be a naive approach to overcoming this by potentially adding an additional service (like a simple wifi heat mapper) to clear up some of the location ambiguity in order to create a reliable bound over the location? Are their any APIs in existence to help with such a problem?
Are you talking about some specific buildings or any building that the user has entered? In the first case I would use beacons or IndoorAtlas. Both methods require you to visit the buildings and either install beacons or map it up with IndoorAtlas. With beacons it would be enough just to place one on each exit to keep track of who enters and exists the building.
There's really no possible way to reach building-level accuracy with a method that would be possible the extend to any building. The only exception would be some public buildings, which Google has mapped indoors (read more about the Google indoors project here). However, the list of available locations is still really limited.
Even though not optimal, the easiest way would be to use GPS/core-location for this project. According to our experiments, GPS never shows your location inside the building, where you are currently, but always about 15m outside of it. You could try placing a geofence that is slightly larger than the building itself outside of the locations you wish to use.
Whichever technology you end up using, you can try the Proximi.io API for a super simple solution of keeping track of the locations and geofences/beacons.