Android Question (Solved) Starter to run a timer in the background

edm68

Member
Licensed User
Longtime User
Hi, I'm trying to learn more about using the Starter to run background tasks.

As a test I made the attached program to try to learn from. It just runs a timer and prints the time to a text file every 60 seconds. It works well when the activity is active, but after it goes to the background for a while the 60 seconds gets to be more than 90 seconds. I've searched and can't figure out what I'm doing wrong.

I've also attached the text file from a test I did tonight.

Thanks for any advice.
 

Attachments

  • starterTest.zip
    10.2 KB · Views: 302
  • myTimeLog.txt
    282 bytes · Views: 294

edm68

Member
Licensed User
Longtime User
Yes, thank you, that seems to have worked.

After adding this & running in the background for almost 1.5 hours was off by less than 5 seconds.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…