Question

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?

Was it helpful?

Solution

Well i was calling the service in the launch of the application just for test. but if I navigate in my app after the 30 seconds, the new activity is brought to the front correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top