title: Android: notifyDataSetChanged is called but ListView not updated
body: <p>I got this ListView which is populated from a JSON data on the web. But when I updated the JSON entry, for example adding a new entry the ListView isn't updated. It doesn't show the new entry on the list even though I've already called the notifyDataSetChanged().</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public class ProjectsList extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.projects_list);
          Intent serviceIntent = new Intent(this, LooserSync.class);
          startService(serviceIntent);
          ListView listView = (ListView) findViewById(R.id.lstText);
          MySimpleCursorAdapter projectAdapter = new MySimpleCursorAdapter(this, R.layout.listitems,
                  managedQuery(Uri.withAppendedPath(LooserProvider.CONTENT_URI,
                          Database.Project.NAME), new String[] { BaseColumns._ID,
                          Database.Project.C_PROJECTTITLE, Database.Project.C_SMALLIMAGE }, null, null,
                          null), new String[] { Database.Project.C_PROJECTTITLE, Database.Project.C_SMALLIMAGE }, new int[] {
                          R.id.txt_title, R.id.image });
          listView.setAdapter(projectAdapter);
          projectAdapter.notifyDataSetChanged();
  
  
          listView.setOnItemClickListener(new OnItemClickListener() {
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {              
  
                  Intent i = new Intent(ProjectsList.this, DetailsActivity.class);
                  i.setData(Uri.withAppendedPath(Uri.withAppendedPath(
                          LooserProvider.CONTENT_URI, Database.Project.NAME), Long
                          .toString(id)));
                  i.putExtra("spendino.de.ProjectDetail.position",position);
                  startActivity(i);
              }
          });
  
      }
  
      class MySimpleCursorAdapter extends SimpleCursorAdapter {
  
          public MySimpleCursorAdapter(Context context, int layout, Cursor c,
                  String[] from, int[] to) {
              super(context, layout, c, from, to);
              loader = new ImageLoaderCache(context);
              this.context = context;
          }
          Activity activity= ProjectsList.this;
          Context context=null;
          ImageLoaderCache loader = null;
  
          public void setViewImage(ImageView v, String value) {
              v.setTag(value);
              loader.displayImage(value, activity, v);
          }
      }
  
  
  }
  </code></pre>
  
  <p><strong>UPDATED here's the LooserSync.java</strong></p>
  
  <pre><code>public class LooserSync extends IntentService {
  
      public LooserSync() {
          super("LooserSyncService");
      }
  
      @Override
      protected void onHandleIntent(Intent intent) {
          Database.OpenHelper dbhelper = new Database.OpenHelper(getBaseContext());
          SQLiteDatabase db = dbhelper.getWritableDatabase();
          DefaultHttpClient httpClient = new DefaultHttpClient();
          db.beginTransaction();
          HttpGet request = new HttpGet(
                  "http://liebenwald.spendino.net/admanager/dev/android/projects.json");
          try {
              HttpResponse response = httpClient.execute(request);
              if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                  InputStream instream = response.getEntity().getContent();
                  BufferedReader r = new BufferedReader(new InputStreamReader(
                          instream), 8000);
                  StringBuilder total = new StringBuilder();
                  String line;
                  while ((line = r.readLine()) != null) {
                      total.append(line);
                  }
                  instream.close();
                  String bufstring = total.toString();
                  JSONArray arr = new JSONArray(bufstring);
                  Database.Tables tab = Database.Tables.AllTables.get(Database.Project.NAME);
                  tab.DeleteAll(db);
                  for (int i = 0; i &lt; arr.length(); i++) {
                      tab.InsertJSON(db, (JSONObject) arr.get(i));
                  }
                  db.setTransactionSuccessful();
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
          db.endTransaction();
          db.close();
  
      }
  
  }
  </code></pre>