Question

If I want to start some action from the service via Handler.postDelayed, can I start that action a couple of days ahead? Or there is some king of timeout for this, e.g. 12 hrs, 24hrs, etc.?

I am asking this as I think that the action does not execute if I set it for 24hrs ahead.

mHandler.postDelayed(this, 1000 * 60 * (24 * 60));

I am not sure about this and I just want to exclude this guess if the issue is not in it.

Was it helpful?

Solution

Handler is not intended for jobs to be executed 12 or 24 hours later. Use Timer instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top