Passing bundle to activity set as singletask

Posted by Falmarri on Stack Overflow See other posts from Stack Overflow or by Falmarri
Published on 2010-04-22T06:52:33Z Indexed on 2010/04/22 6:53 UTC
Read the original article Hit count: 203

Filed under:
|
|

So I have a MapActivity that runs an asynchtask that occasionally updates what exactly it's displaying on the map (via a string). I originally pass this string in from the intent when the activity is first created. And then if you click on one of the drawables on the map, it opens a new activity, which can then create a new mapview (same class) with a different string setting. The problem I have is that I only want one instance of the mapview to be running at once. Thus I set android:launchmode="singletask" in the manifest. This works in that it brings the mapactivity to the front, but is there any way to send it a new intent bundle to get a new setting for the string it needs? I tried regetting the extras from the bundle, but it seems to retain the old bundle, not the new intent that was passed to it. I'm not sure I want to do startActivityForResult because the 2nd activity may or may not want to update the original activity.

I hope that made sense. I can post code if necessary, but I think that should explain my situation.

© Stack Overflow or respective owner

Related posts about android

Related posts about java