[android-developers] Data getting null when the app in background

2014-01-15 Thread Abhilash Baddam
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

Re: [android-developers] Data getting null when the app in background

2014-01-15 Thread Marina Cuello
The quick solution is to check, on the onResume of your activity, if the data is null, and if it's null, restart everything. There are other, better ways, but that's the quickest one to code. If you want to find better options, Google about activity life cycle and specially recreation of