created an own application which gets started automatically although it gets removed or closed by the user by using Timertask class run method but it is working fine for delay upto 15min and 20 min but the run action not works after delay of 2 hrs. Here are my codes
timerTask = new LoginTimerTask(this);
timer.Schedule(timerTask,(long) TimeSpan.FromHours(2).TotalMilliseconds , (long)TimeSpan.FromHours(2).TotalMilliseconds);
public class LoginTimerTask : TimerTask
{
MainActivity mainActivity;
public LoginTimerTask(MainActivity activity)
{
mainActivity = activity;
}
public override void Run()
{
var intent = new Intent(mainActivity, typeof(MainActivity));
mainActivity.StartActivity(intent);
}
}