sandalone
sandalone

Reputation: 41759

Is there a timeout for Handler.postDelayed?

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.

Upvotes: 2

Views: 903

Answers (1)

Gallal
Gallal

Reputation: 4262

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

Upvotes: 2

Related Questions