cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
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 Smiley Happy

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 184 members 5,110 guests
Please welcome our newest community members: