title: Insert data into content provider then display it in a listview
body: <p>I still have the force shutdown prob when i run the emulator.What have i done wrong??</p>
  
  <pre><code>package fypj.ContactList;
  
  import android.app.Activity;
  import android.app.ListActivity;
  import android.content.ContentResolver;
  import android.content.ContentValues;
  import android.database.Cursor;
  import android.net.Uri;
  import android.os.Bundle;
  import android.provider.ContactsContract;
  import android.provider.Contacts.People;
  import android.provider.ContactsContract.CommonDataKinds.Phone;
  import android.provider.ContactsContract.Data;
  import android.widget.ArrayAdapter;
  import android.widget.ListAdapter;
  import android.widget.ListView;
  import android.widget.SimpleCursorAdapter;
  import android.widget.TextView;
  
  public class ContactList extends ListActivity {
      TextView ContactsTV;
      ListView ContactsLV;
      Uri phoneUri = null;
      Uri emailUri = null;
      Uri uri;
      ContentValues values = new ContentValues();
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          ContactsTV = (TextView)findViewById(R.id.txt);
          ContactsLV = (ListView)findViewById(R.id.list);
          //populateContactList();
          insert(uri, values);
          //retrieve contracts and bind them to list view
          String [] projection = new String[]
          {Phone.DISPLAY_NAME};
          ContactsTV.setText(ContactsContract.PhoneLookup.CONTENT_FILTER_URI.toString());
          int[] to = new int[]{R.id.txtName};
  
          Cursor managedCursor = managedQuery(phoneUri, projection, null, null, null);
          ListAdapter sca = new SimpleCursorAdapter
          (this, R.layout.listrow, managedCursor,projection, to);
          ContactsLV.setAdapter(sca);
      }
  
      public final Uri insert(Uri uri, ContentValues values){
          values.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
          values.put(Phone.DISPLAY_NAME, "Jaslyn");   
          values.put(Phone.LABEL, "Jaslyn Goh");
          values.put(Phone.STARRED, 1);
          uri = getContentResolver().insert(Data.CONTENT_URI, values);
  
  
          phoneUri = Uri.withAppendedPath(uri, People.ContactMethods.CONTENT_DIRECTORY);
  
          values.clear();
          values.put(Phone.TYPE, Phone.TYPE_MOBILE);
          values.put(Phone.NUMBER, "91289161");
          return getContentResolver().insert(phoneUri, values);
          //emailUri = Uri.withAppendedPath(uri, People.ContactMethods.CONTENT_DIRECTORY );
          //values.clear();
          //values.put(People.ContactMethods.KIND, Contacts.KIND_EMAIL);
          //values.put(People.ContactMethods.DATA, "asd@hotmail.com");
          //values.put(People.ContactMethods.TYPE, People.ContactMethods.TYPE_HOME);
          //getContentResolver().insert(emailUri, values); 
  
      }
  </code></pre>