Thanks Richard for the reply.
Actually when I clear the RAM from task manager it clears all the memory of 
my application including some global variables shared between the 
activities. And when the activity restarts I am getting null pointer 
exceptions because this global variables are getting cleared. One way is to 
store the application state in bundle but is there any other way? 

If my whole application is closed then its fine, no need to preserve the 
application state also.

On Tuesday, July 17, 2012 4:06:21 PM UTC+5:30, RichardC wrote:
>
> You need to cope with just your top activity being kill anyway so why is 
> this a problem?
>
> On Tuesday, July 17, 2012 10:18:00 AM UTC+1, xoom wrote:
>>
>>
>> Hello all,
>>
>> I have 50 + activities in my application. Application is built for 
>> android version 2.0 onwards android devices. Everything is working fine on 
>> 2.x and 3.x android running devices but there is a strange problem 
>> happening on 4.x running android devices. 
>>
>> On 4.x device, after starting my app if I clear the RAM from the task 
>> manager i am getting an application crash. I checked the logcat prints and 
>> I found that when I clear the RAM, android kills my current running 
>> activity only (i.e. first in the activity stack). I checked the 
>> documentation and as per the documentation android should close the whole 
>> app (i.e. with the whole activity stack). But the same is not happening on 
>> 4.x devices. Unlike 4.x, 2.x and 3.x devices kills all the parent 
>> activities as well and because of that  the app works without any issue on 
>> 2.x and 3.x devices.
>>
>> I am getting lots of crashes in my app because of this changed behavior. 
>> Is there anything I need to do in my app to handle this specifically for 
>> 4.X android versions.
>> Please help me to solve the issue it is giving lot of trouble to me.
>>
>>

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