Friday, February 19, 2010

[android-developers] Re: singleTask + activity stack not preserved?

These are my results of trying it 3 different ways -

// 1-This "loses task history" after visiting Home
// Intent intent = new Intent("foo.singletask.intent.action.FOO");
// intent.addCategory(Intent.CATEGORY_DEFAULT);

#2 is a mstery. It causes a force close. Don't understand why.

// 2-This does not work - exception is "can't find Activity to handle
Intent"
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory("foo.singletask.intent.category.FOO");

#3 setting the Intent class or component works correctly - singleTask
does not "lose" the task history.

// 3-This works if there is no <intent-filter> in Manifest
//intent.setClass(ActivityA.this, ActivityB.class);

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate