title: Android 2.2 Contact Birthday Date
body: <p>I am trying to get birthday date from contact details from android 2.2, can someone help me a little bit with the query.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>@Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          TextView contactView = (TextView) findViewById(R.id.contactview);
  
          Cursor cursor = getContacts();
          while (cursor.moveToNext()) {
  
              String displayBirthday = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Event.START_DATE));
              contactView.append("Birthday: ");
              contactView.append(displayBirthday);
              contactView.append("\n");
          }
  
      }
  
      private Cursor getContacts() {
          // Run query
          Uri uri = ContactsContract.Data.CONTENT_URI;
  
          String[] projection = new String[] {
                  ContactsContract.Contacts.DISPLAY_NAME,
                  ContactsContract.CommonDataKinds.Event.CONTACT_ID,
                  ContactsContract.CommonDataKinds.Event.START_DATE
          };
  
          String where =
                  ContactsContract.Data.MIMETYPE + "= ? AND " +
                  ContactsContract.CommonDataKinds.Event.TYPE + "=" + ContactsContract.CommonDataKinds.Event.TYPE_BIRTHDAY;
          String[] selectionArgs = new String[] {ContactsContract.CommonDataKinds.Event.CONTENT_ITEM_TYPE};
          String sortOrder = null;
          return managedQuery(uri, projection, where, selectionArgs, sortOrder);
      }
  </code></pre>
  
  <p>It seems like something is wrong with this code, I don't get any output on the screen.</p>
  
  <p>I have add  in AndroidManifest.xml</p>
  
  <p>Can someone give me some hint what's wrong with my query, thanks a lot.</p>
  
  <p>Best regards,
  Johnny</p>