Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9245663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:18:55+00:00 2026-06-18T09:18:55+00:00

My listview is not being populated with the data I am pulling from a

  • 0

My listview is not being populated with the data I am pulling from a MySQL database. I have tested the web service and everything is perfect. I was debugging it and I noticed that when I set a breakpoint inside my asynctask it never went there. I stepped from the execute command and it never went inside. Everything runs fine with no errors. I am confused and new, please be gentle.

public class Favorites extends Activity{
  UserFunctions userFunctions  = new UserFunctions();
  ArrayList<String> zipcodes = new ArrayList<String>(0);
  ArrayAdapter<String> arrayAdapter1;

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.favoritespage);
  arrayAdapter1 = new ArrayAdapter<String>(Favorites.this,android.R.layout.activity_list_item,zipcodes);
  new DownloadDataTask().execute();
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
  // Inflate the menu; this adds items to the action bar if it is present.
  getMenuInflater().inflate(R.menu.activity_main_screen, menu);
  return true;
}

private class DownloadDataTask extends AsyncTask<JSONArray, JSONArray, ArrayList<String> > {
  @Override
  protected ArrayList<String> doInBackground(JSONArray... params) {
    JSONArray json = userFunctions.ziplistrequest("37.5", "140.45", "20");
    for(int i=0; i < json.length() ; i++) {
      JSONObject jarray = null;
      try {
        jarray = json.getJSONObject(i);
        String zip = jarray.getString("ZIPCODE");
        zipcodes.add(zip);
        arrayAdapter1.add(zip);
        Log.d(zip,"Output");
      } catch (JSONException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
    return zipcodes;
  }
  protected void onPostExecute(){
    ListView listView = (ListView) findViewById(R.id.list);
    listView.setAdapter(arrayAdapter1);
  }
}

If any additional answers are needed please let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:18:56+00:00Added an answer on June 18, 2026 at 9:18 am

    Good stuff. I’ll add my comment as an answer for Q&A closure and pure SO point greed 🙂

    What happens if you stick the debug point directly on the async task
    doInBackground? Clean & build your project (if using an Eclipse IDE)
    in case there are some compiler/class generation issues

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a listview that is being populated by information from a database using
I have a ul on a page with data-role='listview' however it is not being
I have a web service which queries the cloud for some data and then
The title pretty much says it all. I have a listview being populated by
I have a ListView that is being populated with a custom adapter. I have
I have a ListView that is being populated with a custom adapter. I'd like
I have a listview populated by a database. The listview displays some columns of
I have a ListView in virtual mode, and the underlying data is being stored
I have a ListView item in my application. The scroll position does not get
Exactly as the title says. I am using a listView which is not being

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.