Maps, Gps and proximity

Since theres no real thread for Location APIs I’ll just post my question here and maybe get more people interested in this side of CoronaSDK.

I’ve been playing around with maps and gps for a day or so and it seems like everyone is using Corona for Games 99% so I thought I’d dig into the other aspects of Corona.

So here’s an idea I just go;
What if you made a map/gps app that it’s main purpose is to clock the time you are at a certain position (within a Proximity of you starting position)

So let’s say you arrive to a…construction site and you are there to do some work during the day. When you launch the app at the construction site you press the start button that will locate your position and when it’s ready a timer starts to monitor the time you are at that position.

Now, the gps will check your movement so if you would go outside a certain radius the timer will pause and resume when you return to within the radius of your starting position.

So basically it stops when you leave the work site for lunch, run some errands etc etc…

Of course all work places are of different sizes, but this was just in general how and if it would work.

Because Corona have “event.accuracy” the position will not be correct unless there’s a way to set a threshold for that so it would be more precise.

Also Maps use a RuntimeListener, in what interval does that fires off?

There would be a button to stop the timer and positioning that saves the result to a document.
[import]uid: 13560 topic_id: 13132 reply_id: 313132[/import]

I wrote a similar app a couple of years that submits tracking information to an online mapping service as part of a larger enterprise product for the agricultural industry.

Here are some things that came up as issues to consider:

* GPS takes a lot of power. You can turn it on and off periodically but then you risk losing valid GPS movement. On the other hand - when it’s on constantly, it can quickly deplete a battery.

* The app needs to be on ALL the time for this to work. If you get a phone call, the user needs to remember to turn the app back on after the call is finished. If they quit and do something else, they probably don’t remember to re-start the app. Background services help, but …

* iOS 4’s background multi-tasking adds some GPS handling for this, but I haven’t tried it in Corona. My app was in Objective-C for iOS3. See doco under: Getting Location Events in the Background at: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html%23//apple_ref/doc/uid/TP40009497-CH2-SW10

* iOS exposes additional MapKit calls that aren’t available in Corona to specify accuracy required. These tend to save power usage.

In general, it’s a nifty idea but the power requirements and the fact that the user needs to continue remembering to restart the app if they start using other apps (since iOS can kill your app if memory is low) makes it a bit cumbersome as a product.

Hope this helps,

  • Ian [import]uid: 238 topic_id: 13132 reply_id: 50355[/import]

@hyperphonic

Thanks for the input, I knew the battery would be an issue as it is with all gps apps. The basic concept of the app was pretty much a “Reversed Sonar” where I wanted to incorporate “breadcrumbs” on top of the map to see how a person move around during the day.

And finally, the result of the hours worked etc would get pushed to the company server (auto time reporting). But due to the limitations of CoronaSDK I’m saving this idea for later.

…and for those of you who read this post and “borrow” my idea, don’t forget to mention me in the credits…and share some of the millions you make… :slight_smile: [import]uid: 13560 topic_id: 13132 reply_id: 50381[/import]