I am developing an application on the Android Platform for my music
service (axcid.org)..

Haven't spent a huge amount of time in Java but could use a bit of
help with this code:
http://pastebin.com/m5300a4e6

bit of bad practice in there I know but I haven't spent a ton of time
developing Java apps..

Anyways the problem:
      if (!this.listLoaded) {
                //holdup this needs it's own thread
                //Url load and parse time.

                //Now we can start a thread for the search :)
                Thread thread = new Thread(this);
                thread.start();


I need update media list to be called when:
public void run() {
                // search
        String URL = this.getIntent().getExtras().getString("searchurl");
        sm.LoadResults(URL+"?android=1");
        listLoaded = true;
        }

is done..

However calling it from the thread will crash Android. Did many google
searches but found nothing. Friend told me to try here.

How can I call updateMediaList when the thread is complete? (from the
UI thread)

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

Reply via email to