Here is an use case we are trying ..
Apk .. MyEmail
main -> Inbox
view -> composer
view -> msgview
If the above apk contains 3 activities ..
User launches the "MyEmail: and sees the Inbox ..
User selects one of the messages .. thus launching the "msgview"
activity ..
User goes back to home .. and launches .. composer directly .. ()
Now the user must be able to switch back and forth between "msgview"
and "composer" .. Note this composer window has no association with
the Inbox->msgview ..
One possible method is to launch the MyEmail in own task and launch
another activity (eg.composer) as a separate instance .. This is what
I was trying to show in the code above ..
I did read through the 'warning' in the docs of
FLAG_ACTIVITY_MULTIPLE_TASK usage. Assuming for now we use the
RecentAppsDialog(long key press) as the task switcher .. any
suggestions ?
-Dan
On Feb 2, 12:23 pm, Dianne Hackborn wrote:
> Please please please don't use FLAG_ACTIVITY_MULTIPLE_TASK unless you really
> know what you are doing. At the very least, you need to read and fully
> understand the material here:
>
> http://code.google.com/android/intro/appmodel.html
>
>
>
> On Mon, Feb 2, 2009 at 12:11 PM, Dan Raaka wrote:
>
> > I am trying to launch an activity from another activity ..
> > Within the com.android.SingleLauncher..
>
> > I have activity launch code as ..
>
> > Intent intent = new Intent(Intent.ACTION_MAIN);
> > intent.addCategory(Intent.CATEGORY_LAUNCHER);
> > intent.setComponent(new
> > ComponentName("com.android.TargetSL",
> > "com.android.TargetSL.TargetSL"));
> > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
> > Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
>
> > I have set the android:multiprocess="true" in the AndroidManifest.xml
> > of TargetSL
> > I don't seem to see the multiple instances of TargetSL, which i am
> > expecting ..
>
> > All i see is 2 process, where i was hoping to see an instance of
> > TargetSL, for each launch that was invoked by the singleLauncher !!
>
> > # ps
> > ps
> > USER PID PPID VSIZE RSS WCHAN PC NAME
> > .a bunch of stuff ...
> > app_30 157 23 91484 12140 afe0c824 S
> > com.android.SingleLauncher
> > app_31 236 23 90452 11580 afe0c824 S
> > com.android.TargetSL
>
> > Am I missing something here ?
>
> > -Dan
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support. All such questions should be posted on public
> forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---