2

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?

4

1 回答 1

1

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.

于 2012-12-06T18:21:23.133 回答