I have a record in my Android DB which is saved along with its creation time. I want to have a timer where after 2 hours this item will be deleted. I researched it and I came to two results:
one was to make an AsyncTask, but this solution seems to me like it would take too many resources without any need.
the second was to implement a Service. I know nothing of Services in Android and how they work. I made some reading and I don’t see how I can have a service counting time and checking if it has exceeded its lifespan.
Halp plz.
I have found that `”CountDownTimer” works well as long as your application is alive.