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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With