Can I create an app with a live tracking beacon?

Hi there!

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)

1 or both of those would be INCREDIBLE :slight_smile:

Is it possible? Any ideas?

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.

You can also just use the Start geolocation poller flow function to start a poller, whose latest result and results history will then be available under the geolocation sensor variable sensorVars.geolocation.

2 Likes

Ha! Maybe I should learn the platform before I start offering “helpful” advice!

1 Like

Thanks so much guys!

It encouraging to see there could be ways :slight_smile: I’m really looking forward to staring and seeing how far I can go.

Cheers

2 Likes

Wayne: how would you set this up using polling?

GP

Curious to know whether this flow function works in web?

At the moment, no, but we do plan to tackle web support for the flow functions where it makes sense, so it’s on the backlog.

1 Like

Thanks for the follow-up!

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.

Many thanks, x

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.

bumping this! also very curious to know!

Ya just what I will be working on shortly as well. Any solutions found?

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.

Did you make it? Do you have any tips for anyone starting now? I just want to do a background tracking of the user.

1 Like

I don’t know if appgyver can run in background

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.

Please upvote here: Ability to track location when app backgrounded/closed | Voters | AppGyver