try using this

FLAG_ACTIVITY_REORDER_TO_FRONT<http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT>If
set in an Intent passed to
Context.startActivity()<http://developer.android.com/reference/android/content/Context.html#startActivity(android.content.Intent)>,
this flag will cause the launched activity to be brought to the front of
its task's history stack if it is already running.
 Intent intent = new Intent(this,MailComposer.class);

intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT<http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT>
);
                     startActivity(intent);

On Wed, Apr 11, 2012 at 9:43 AM, Jovish P <android.f...@gmail.com> wrote:

> Thanks for your reply. In our app, from MailComposer screen we are
> navigating to other screens. Using this intent we
> are invoking MailComposer screen from these screens which is already there
> in the stack. What happens  now is, in 1.6  onCreate() method of
> MailComposer screen is called. We don't want that , we just want to resume
> the previous screen which is there in the stack. It is happening correctly
> on 2.1 only problem with 1.6. Anything special we want to do for 1.6 ?
> Please correct if I am wrong ?
>
>
>                      Intent intent = new Intent(this,MailComposer.class);
>
> intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP);
>                      startActivity(intent);
>
>
>
>
>
> On Wed, Apr 11, 2012 at 3:41 AM, Mike Wolfson <mwolf...@gmail.com> wrote:
>
>> onResume() happens after onCreate(), so just put your code here, and you
>> will be covered for both cases.
>>
>>
>> On Tuesday, April 10, 2012 10:23:36 AM UTC-7, Jovish P wrote:
>>>
>>> In our app we are using following code
>>>
>>>             Intent intent = new Intent(this,MailComposer.**class);
>>>             intent.setFlags(Intent.FLAG_**ACTIVITY_CLEAR_TOP|Intent.**
>>> FLAG_ACTIVITY_SINGLE_TOP);
>>>             startActivity(intent);
>>>
>>> The problem we are facing is , in 2.2 onResume() of MailComposer screen
>>> is getting invoked but in 1.6 onCreate() is getting invoked and onResume()
>>> after that. Why it is so ? Is it a bug  in Android or fault from our side
>>> ????? Please help me out ..........
>>>
>>> Regards,
>>> Jovish p
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Android Discuss" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/android-discuss/-/Ou2r8xg1eKgJ.
>> To post to this group, send email to android-disc...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> android-discuss+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/android-discuss?hl=en.
>>
>
>  --
> 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
>



-- 
--Jitesh .V. Dedhiya---

Don't Learn To Hack but Hack To Learn

-- 
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