cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imaliasad
Level: Powered On

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
myke_deabreu
Level 8

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
myke_deabreu
Level 8

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

imaliasad
Level: Powered On

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 🙂

myke_deabreu
Level 8

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-...

SoB
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 186 members 4,666 guests
Please welcome our newest community members: