Use onSavedInstanceState to save your data and retrieve it in onCreate ( 
if(savedInstance != null) ...)

On Wednesday, January 15, 2014 12:47:23 PM UTC-5, abhay_401 wrote:
>
> Hi,
>
> In my activity there are two spinners,listview and a button GO. 
> When the user select the options from the spinners and he clicks on GO 
> button there is a server request.
> whatever the response comes from server i am displaying that data in 
> listview...
> Once the data displayed, if the user keep the app in background by 
> pressing home..after sometime if the user again comes back to the screen
> i am getting null pointer exception as the data or object passed to the 
> listview adapter is getting null.
> Seems System is garbage collected the data... How can I overcome this 
> situation.
>
> Can anyone help me on this...
>  

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to