Today I found the strange problem.In my application I am starting a activity from service
Intent in=new Intent(AlarmService.this, GuardActivity.class);
in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(in);
Now after sometime i call ondestroy of activity. here I observe that my service is started again. This behavior is very strange.Do any body faced same problem
It is simple services with just above line...So I am not posting complete code
Activity
Timer t = new Timer();
t.schedule(new TimerTask() {
@Override
public void run() {
try{
finish();//Activity destroy itself after 10 sec
}
catch(Exception e)
{
}
}
}, 10*1000);// 10 sec