Issue in calling Activity from the IntentService class
<p>In my app I am using <code>IntentService</code> class to start another activity in the background. But the issue I got is that suppose from the <code>IntentService</code> class I start my activity, which open my activity, after that I don't close my activity. Then I notice that when <code>IntentService</code> class again want to start my same activity it is not called as the same activity is not close. So My question is how can I started the same activity again and again whether it is open or close from the <code>IntentService</code> class. </p>

<p><strong>Code in IntentService class</strong></p>

<pre><code>public class AlarmService extends IntentService
{       

    public void onCreate() {
        super.onCreate();
    }

    public AlarmService() {
        super("MyAlarmService");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        super.onStartCommand(intent, startId, startId);
        return START_STICKY;
    }

    @Override
    protected void onHandleIntent(Intent intent) {          
        startActivity(new Intent(this, 
            AlarmDialogActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
    }       
}
</code></pre>
