The OS may kill any process which isn't active (or very occasionally,
even ones which are), and you certainly can't rely on the user's phone
having plenty of resources. So, using static variable in an AppWidget
isn't reliable; you need to store information between runs someplace
else, such as SharedPrefs.

String

On Jan 14, 8:49 pm, Albert <albert8...@googlemail.com> wrote:
> Hi there,
>
> I am seeing a curious behaviour in my app. I have a widget that gets
> updated by a service every # hours, when the service finishes I stop
> it, using "stopService(new Intent(this, MyService.class));", the
> widget if pressed launches an Activity. Now it gets interesting, while
> im on the activity everyting works fine, then when I exit the app(by
> the back key or a button I designed which simply calls this.finish() )
> the ActivityManager would tell me that my process has died, I do not
> see any error of any kind, just that the process has died.
>
> Why I am seeing that message and what does it mean exactly? That is
> having a side effect on my service regarding static variables getting
> set to default. Could my code be the cause of this?
>
> Is there any way to know that your process has died?
>
> I have tested my app on a HTC Hero running 1.5, it always works well
> on the emulator and I never get that message. I know android kills
> processes to reclaim memory but Im always careful to close apps heavy
> on resources.
>
> Any hint would be appreciated.
>
> Thanks,
> Alberto
-- 
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