cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Adi1607
Frequent Visitor

How to track time when device is on sleep

I am tracking time with my app. When the user clicks on the complete button the time is recorded for that task. Currently, I have kept the device on never sleep mode so that the time control does not pause. Do you have any alternate way to track the time even if the device is on sleep mode?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Adi1607 

I believe you might want to look at the approach of just recording the time at which you start.  Then at any other point where you are needing to determine the elapsed time, you can just do a datadiff on the stored starting time and Now().

Might be easier to look at it that way rather than to deal with a timer running in sleep mode (which you'll not get).

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@Adi1607 

I believe you might want to look at the approach of just recording the time at which you start.  Then at any other point where you are needing to determine the elapsed time, you can just do a datadiff on the stored starting time and Now().

Might be easier to look at it that way rather than to deal with a timer running in sleep mode (which you'll not get).

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

eka24
Super User III
Super User III

I don't think it necessary to keep your device opened. The users device will be different from yours. I suggest when the user click, the time should be saved into a Datasource.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,504)