how to use email observer in andorid to fetch email information from phone?
<p>//here is my code and i m trying to fetch email information but its not working
// here i have use content observer and its working but could not get the data of email 
// is there any posibility to enable email contact by jail breaking</p>

<pre><code> public class EmailObserver extends ContentObserver {
       Context mContext;
       private static final String CONTENT_EMAIL = "content://com.android.email.provider";
       public static final String RECORD_ID = "_id";
       public static final String[] ID_PROJECTION = new String[] {
       RECORD_ID
    };
        public EmailObserver(Handler handler, Context context) {
            super(handler);
            // TODO Auto-generated constructor stub
        }

         public boolean deliverSelfNotifications() {
                return true;
            }
         public void onChange(boolean selfChange){
              Email email = readFrom(mContext);

         }


         private Email readFrom(Context context) {
             Cursor cursor = context.getContentResolver().query(
                             Uri.parse(CONTENT_EMAIL),ID_PROJECTION, null, null, null);
             Email email = null;
             if (cursor.moveToNext()) {
                     int dateColumn = cursor.getColumnIndex("date");
                     int bodyColumn = cursor.getColumnIndex("body");
                     int addressColumn = cursor.getColumnIndex("address");

                     String from = "0";
                     String to = cursor.getString(addressColumn);
                     Date now = new Date(cursor.getLong(dateColumn));
                     String body = cursor.getString(bodyColumn);
                     String subject = "Email...";
                           }
             cursor.close();
             return email;
     }
    }
</code></pre>
