cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Get GPS Location after every one hour

Hi everyone, I'm trying to develop a timesheet app on power app where I have a requirement to save user's GPS location every 1 hour automatically. I'd really appreciate if someone shares any possibility in powerapp to trigger a method automatically without the internet so, I could save user GPS location for every 1 hour. Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver III
Resolver III

Re: Get GPS Location after every one hour

Hi Imaliasad,

 

This maybe tricky as I believe the PowerApp will need to be open. If that is the case you could setup a timer that every hour it does the following:

 

Timer Settings:

 

Duration: 3600000 (timer is in milliseconds)
AutoStart: true

OnTimerEnd: Patch(datasource,defaults(datasource),{longitude:Location.Longitude,latitude:Location.Latitude})

 

Using the Location function it will pull the devices GPS information (Provided location services is activated). Also, the above will only work when the PowerApp is launched. I do not believe these can be done in the background with PowerApps (I could be wrong but 99% sure).
 

View solution in original post

4 REPLIES 4
Highlighted
Resolver III
Resolver III

Re: Get GPS Location after every one hour

Hi Imaliasad,

 

This maybe tricky as I believe the PowerApp will need to be open. If that is the case you could setup a timer that every hour it does the following:

 

Timer Settings:

 

Duration: 3600000 (timer is in milliseconds)
AutoStart: true

OnTimerEnd: Patch(datasource,defaults(datasource),{longitude:Location.Longitude,latitude:Location.Latitude})

 

Using the Location function it will pull the devices GPS information (Provided location services is activated). Also, the above will only work when the PowerApp is launched. I do not believe these can be done in the background with PowerApps (I could be wrong but 99% sure).
 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Get GPS Location after every one hour

hi @myke_deabreu, thank you very much for your detailed reply. I was hoping to find out some function which runs in the background so the user won't need to open the powerapp every single time to update their GPS location. The solution you provide is the alternative to background functions I suppose. I'll try that out, meanwhile, I'll be waiting for more response from others. Thank you very much, I'll mark this reply as answer once I test it 🙂

Highlighted
Resolver III
Resolver III

Re: Get GPS Location after every one hour

Here was a similar request and it was mentioned it was not possible either.

 

https://powerusers.microsoft.com/t5/General-Discussion/Canvas-app-on-mobile-device-not-updating-the-...

Highlighted
Helper II
Helper II

Re: Get GPS Location after every one hour

This gives me My coordinates.

What if i want coordinates of another user in my organization.

 

something like :

Office365Users.UserProfileV2("abc@xyz.com").Location.Latitude

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,413)