Gmail.java link as referred to in one of the questions on SO is broken.
My code is
String account="abc.xyz@gmail.com";
Uri LABELS_URI = Uri.parse("content://gmail-ls/unread/");
Log.d("pavan","label "+LABELS_URI );
Uri ACCOUNT_URI = Uri.withAppendedPath(LABELS_URI, account);
Log.d("pavan","label "+ACCOUNT_URI );
ContentResolver contentResolver= this.getContentResolver();
Log.d("pavan","contentResolver "+contentResolver );
Cursor cursor = contentResolver.query(ACCOUNT_URI, null, null, null, null);
but the contentResolver line is throwing an error, the logcat says:
cannot find provider info for gmail-ls.
Any ideas how to solve this?
Use the Android Gmail API, if it meets your needs. Otherwise, the Gmail application no longer supports access such as what you are doing.