Mans, im here around 2 hours in one thing it seems very simple but never return the numbers of objects.
I will explain whit code:
DownloadFileAsyncTask.java (is my Async Task)
in OnPostExecute i make this:
if(customAdapter != null){
Log.i("solteiroApp","object count is "+customAdapter.getCount());
ResultActivity.rec_count = customAdapter.getCount(); // HERE I PASS COUNT
}
ResultActivity.java
public class ResultActivity extends Activity {
public static int rec_count;
...
The problem is: When i get the ResultActivity.rec_count
in onCreate
always return 0, but i make the log how i show before:
Log.i("solteiroApp","object count is "+customAdapter.getCount());
and this return the count correctly.
I dont know because this, if someone have a sugestio to get this count please say me, im hours here try return this count to appear in the activity but nothing return the value in time of i execute, if i use again the AsyncTask return the previous value, please someone help me.