tags:

views:

26

answers:

1

Hi, I have an intent which i need to set it, two flags:

FLAG_ACTIVITY_SINGLE_TOP -> coz i wanna keep the instance of the current activity in case it' already focused.

FLAG_ACTIVITY_NEW_TASK -> coz i launch the intent outside of it's activity(contexnt.startactivity(..))

problem is that i cant combine both of them.. any other solution?

this is my exception:

06-30 09:12:48.577: ERROR/AndroidRuntime(2460): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?

thanks,

ray.

+1  A: 

solution was to use addFlags instead of setFlags, but it still didnt influence.. for example if i currently use browser, and i run another browser intent with those flags, the current page IS being channged

rayman