asyncTask problem

All your problems with Audio, Video and Images.

asyncTask problem

Postby cucuru » Mon Oct 03, 2011 4:01 pm

hello! I'm working with Android 13 (with google maps), I need to get some database data in mysql, so, I use a php script and get that data, the problem is that I have to do it extending AsyncTask, and it executes in background I get the data late, because my program continues running:


Code: Select all

        noticesHTTP noticesHTTP = new noticesHTTP(); //noticesHTTP extends AsyncTask
        ArrayList<String> title = noticesHTTP.returnNotices(); 
       
        setContentView(R.layout.notices);
       
        String[] noticesString = title.toArray(new String[title.size()]);
        for (int i = 0; i<noticesString.length; i++){
           Log.i("String", noticesString[i]); //EMPTY!!!!   
        }
       
        notices = (ListView)findViewById(R.id.notice);
        ArrayAdapter<String> adaptor = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, noticeString);
       
        notices.setAdapter(adaptor);



How can I solve it? Thank you very much!!!
cucuru
Freshman
Freshman
 
Posts: 2
Joined: Mon Oct 03, 2011 3:56 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 16 guests