I’m playing around with an app that has a lot of mapping and GPS use.
I need 1) a live beacon to be able to move across the globe and 2) even better then that would be the ability to leave a permanent track of that beacons path. (ie running tracking app but at a larger scale)
You could do this pretty quickly in AppGyver Composer. What I don’t know, though, is if a deployed AppGyver app would function in the background on a device. It could be that the app has to be active on the screen - which would be a deal killer for this kind of application. That being said, to build a very basic implementation, I would do the following:
setup a client side data source to store GPS data (decide what you want based on what the GPS logic flow provides) and then bind that to a data variable
Create a page variable called “trackingEnabled” and make it a boolean type
Put a checkbox on your app page and give it a label of “Enable tracking” and bind it’s value to the variable you just created.
After the “Page mounted” event for your page, I would add a few logic flows
First would be the “If condition”. I’d check the page variable value here. Route the “true” output to a “GPS location” flow to get your current location and then use a “Create record” flow to store whatever data you want from the GPS;
From there I would route to a Delay logic flow. Set the delay value to however often you want the location checked. And back to the previous “If condition” flow you setup, I would route the “false” output of that to this same delay input. Route the output of the delay back to the input of the “If condition”.
So - what you’d have is a very simple app that continually gets and stores your GPS location at whatever time interval you set. If your check box is “unchecked”, then it bypasses lookup up the GPS location and continues the loop without recording data. You could use the “Embedded map view” component from the market place to log your live and previous locations.
Hi Sarah_Berry, I hope you are well. How far did you get with your project?
I am hoping to use an app as a live tracker for my delivery drivers and and researching AppGyver. It looks promising so far but I don’t want to commit too much time until I am confident of the funtioanality.
Hi! Just to note we have a bug with geolocation pollers that is getting fixed in 2.6.X – namely the pollers weren’t working properly nor were they as accurate as would have been nice.
Hey Wayne,
I ran into the problem mentioned by you in your answer.
I made a basic tracking app by following your method with my own api. The app runs amazingly well when the phone is active and being used. But, if the screen becomes inactive, my backhand database stops receiving any gps coordinates,and the moment I turn back my screen, the data is received.
Can this problem be resolved? Any appgyver team member is welcome to help me out here.
Big thanks.
Regards.
Yes, would love to see if this is possible. I am developing a running app (like Strava). Most of the time the app will be closed when the user is running.
Background tracking is not possible at the moment. With third party plugins this would become possible, but just to warn you, Apple and Google are very strict about apps that want to use location in background.