In my app there is a Service
that is intended to run constantly in background once started. This service is started from an Activity
and this is the onStartCommand()
method:
MyService:
....
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(Intent intent, int flags, int startId)
mHandler.postDelayed(new myRunnable(), scheduledTime);
}
I want to know if having a very big scheduledTime
(lets say a couple of days in milliseconds), the Handler
will still execute the Runnable
?
Or should I better use the AlarmManager
for this?
Thanks.