No,
but how can i finish activity using Context, finish isn`t derived
method and is available only in Activity class.

On 15 Paź, 13:09, Kumar Bibek <[email protected]> wrote:
> Yep, in normal circumstances. Did you try using the Activity's context and
> see if it makes any difference?
>
>
>
>
>
> On Fri, Oct 15, 2010 at 4:33 PM, mariush <[email protected]> wrote:
> > so after invoking finish() onDestroy and onStop must or should be
> > invoked?
> > Moreover, it not happens on all kind of devices, i can reproduce
> > problem on HTC Legend with Android 2.1, but on Sony Ericsson Xperia
> > X10 Android 1.6 everything is invoked as expected.
> > My activity is running in singleInstance launchMode, when onDestroy
> > and onStop isn`t invoked, and i`ll try to launch once again activity,
> > new instance is created(thought old isn`t destroyed)...
>
> > On 15 Paź, 04:43, Kumar Bibek <[email protected]> wrote:
> > > If you are finish an activity through code, onStop and onDestroy should
> > be
> > > called. In extreme cases where the system kills your app, these two
> > methods
> > > may or may not be called.  I am sure, you are doing something wrong. Or
> > may
> > > be it has got something related to "reboot" of phone.
>
> > > On Fri, Oct 15, 2010 at 2:02 AM, icedogchi <[email protected]> wrote:
> > > > onStop and onDestroy may or may not be called.  onPause is the last
> > > > method you are guaranteed will be called.  Check out the activity life
> > > > cycle:
> >http://developer.android.com/reference/android/app/Activity.html
>
> > > > On Oct 14, 1:04 am, mariush <[email protected]> wrote:
> > > > > Hi,
> > > > > i`ve got some problems with finish() method.
> > > > > I expect what after calling on my Activity finish() method  onStop
> > and
> > > > > onDestroy must be triggered(or am wrong??), in majority of examples
> > > > > they are, but...
> > > > > Scenario:
> > > > > - reboot phone
> > > > > - launch activity
> > > > > - invoke finish()
> > > > > onPause is triggered but afterwards they are no calls to onStop() and
> > > > > onDestroy()...
> > > > > I`ve noticed, that those calls are triggered after launching any
> > other
> > > > > activity...
> > > > > Any ideas why this is happening?
> > > > > Regard
> > > > > Mariush
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > [email protected]
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<android-developers%2bunsubs­[email protected]>
> > <android-developers%2bunsubs­[email protected]>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com

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

Reply via email to