I have a service which is making a call to a webserver from 30 to 30 seconds. If a certain value is returned i need to start a specific activity. the problem is for starting an activity from service I need to set intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
By doing this, the activity is launched but it is closed after 3-4 seconds and the application keeps is normal flow.
how can I add the new activity to the top of stack?