title: How to use notifyDataSetChanged from a different class ?
body: <p>I have an Http call class I made to send some images. I want these requests to be done in the background so the user can continue doing whatever they want in the app. </p>
  
  <p>When the call has finished executing, I want to remove the Item from the listview and update it. </p>
  
  <p>Here is my code. </p>
  
  <pre><code>public HttpCall(ArrayList&lt;Jobs&gt; jobs, ArrayList&lt;GridImages&gt; images, ArrayList&lt;GridImages&gt; signatures, Context context,TwoColumnListAdapter customadapter) {
      this.jobs = jobs;
      this.images = images;
      this.signatures = signatures;
      this.context = context;
  
      listView = (SwipeMenuListView) ((Activity) context).findViewById(R.id.listView);
  
      adapter = customadapter;
  
      mydb = new Database_Helper(context);
  }
  
  
  
  public void SendALL(){
  
  //Calls the http requests and then executes the update for the listview.
  
  
     listView.post(new Runnable() {
          @Override
          public void run() {
  
  
  //          Intent intent = new Intent(context,AddJob.class);
  //          context.startActivity(intent);
  
              listView.setAdapter(adapter);
              adapter.remove(jobs.get(0));
              adapter.notifyDataSetChanged();
          }
      });
  }
  </code></pre>
  
  <p>I could start a new Intent and then it will show that it updated the listview as the AddJob class makes a call to the database and updates the listview.</p>