title: Notify ListView on receiving Dataset
body: <p>I have a ListView that gets its dataset from a BaseAdapter.
  The ListView receives data when a menuItem is clicked.
  I am not able to notify my listView or my ListAdapter (inboxAdapter.notifyDataSetChanged()), doesnt work.
  Any other approaches.</p>
  
  <pre><code>case R.id.Get:
    retrieveList();
    inboxEmails = EmailElement.parseContent();
    inboxAdapter = new nboxAdapter(getApplicationContext(),inboxEmails);
     if(inboxAdapter !=null){
      listView.setAdapter(inboxAdapter);
      listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
      inboxAdapter.notifyDataSetChanged();
    }
  break;
  </code></pre>
  
  <p>//this method retrieveList by sending sms</p>
  
  <pre><code>private void retrieveList(){
    registerReceiver(new SMSSentReciever(), new IntentFilter(SMSInfo.SENT));
    registerReceiver(new SMSDeliveredReciever(), new IntentFilter(SMSInfo.DELIVERED));
    PendingIntent sentIntent = PendingIntent.getBroadcast(this, 0, new Intent(SMSInfo.SENT), 0);
    PendingIntent deliveryIntent = PendingIntent.getBroadcast(this, 0, new Intent(SMSInfo.DELIVERED),0);
    SmsManager.getDefault().sendTextMessage("5556",null, "fruits", sentIntent, deliveryIntent);
  </code></pre>
  
  <p>}</p>
  
  <p>Based on the message from broadcast i need to update or notify my Listview, for now when i click the  menu firstly i get my message on the emulator and then from the other emulator i send above message, the toast is shown,but not the listview but once i click the menu again i finally get the listview. WHat have i done wrong?</p>