Hi, Dianne: ok, thanks.
I use the following functions to determine the task id and if it is
the root of a task:

activity.getTaskId();
activity.isTaskRoot();

I used logcat looking for useful hints. Let me see if I understand it
better if I use
"adb shell dumpsys activity"

On Sat, May 2, 2009 at 10:39 AM, Dianne Hackborn <hack...@android.com> wrote:
> The behavior you are describing is not how things work.  What do you mean
> you don't see another task?  How are you telling?  "adb shell dumpsys
> activity" will show you the current activity state with the exact task
> organization (in the first part of the output).
>
> On Fri, May 1, 2009 at 9:17 PM, devi prasad <dpras...@gmail.com> wrote:
>>
>> Hi
>> I am trying to understand the interactions among apps, processes,
>> activities,
>> and tasks. After reading 'Application Fundamentals' many times, I wrote a
>> tiny
>> piece of code with three different activities. Here's my manifest file:
>>
>> <application android:icon="@drawable/icon" android:label="ABC">
>>        <activity android:name=".AppRootActivity"
>>                  android:label="App1">
>>            <intent-filter>
>>                <action android:name="android.intent.action.MAIN" />
>>                <category android:name="android.intent.category.LAUNCHER"/>
>>            </intent-filter>
>>        </activity>
>>
>>        <activity android:name=".ChildActivityOfRoot"
>>                  android:label="ChildActivity:ChildOfAppRootActivity">
>>        </activity>
>>
>>        <activity android:name=".SingleTaskActivity"
>>                  android:label="ChildActivity:SingleTaskActivity"
>>                  android:launchMode="singleTask">
>>        </activity>
>> </application>
>>
>> The AppRootActivity starts ChildActivityOfRoot which in turn starts
>> SingleTaskActivity.
>>
>> Since 'SingleTaskActivity' is marked with 'singleTask' launchMode I
>> expected
>> two different tasks with the following activity sets:
>> Task1 --> AppRootActivity - ChildActivityOfRoot
>> Task2 --> SingleTaskActivity
>>
>> However, I was surprised to see all three activities running in the same
>> task.
>> This doesn't change even if I use Intent.FLAG_ACTIVITY_NEW_TASK flag in
>> the
>> intent used to activate 'SingleTaskActivity'. I use the getTaskId() to
>> determine
>> the task the activity is running.
>>
>> IMO this behavior is not at all apparent from the documentation. Can
>> someone
>> shed more light?
>>
>> Thanks
>>
>>
>
>
>
> --
> 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, and so won't reply to such e-mails.  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
-~----------~----~----~----~------~----~------~--~---

Reply via email to