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

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

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

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

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,551)