Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Content Provider and People.ContactMethods.DATA

Content Provider and People.ContactMethods.DATA

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Content Provider and People.ContactMethods.DATA

Postby kidotai » Wed Dec 16, 2009 2:58 pm

how to differentiate between "email address" and "postal address"?


try{
String[] columns = new String[] {
People.ContactMethods.DATA,
People.ContactMethods.KIND,
People.ContactMethods.TYPE };

Uri emailUri = Uri.withAppendedPath(People.CONTENT_URI, String.valueOf(idContact));
emailUri = Uri.withAppendedPath(emailUri, People.ContactMethods.CONTENT_DIRECTORY);;

Cursor cur = managedQuery(emailUri,columns,null,null,null);

if (cur.moveToFirst()) {
do {
int tipoMail = cur.getInt(cur.getColumnIndex(People.ContactMethods.TYPE));
int kind = cur.getInt(cur.getColumnIndex(People.ContactMethods.KIND));
String streMail = cur.getString(cur.getColumnIndex(People.ContactMethods.DATA));

} while (cur.moveToNext());
}

}
catch(Exception ex){
Log.e("ContactsManager", "GetEmailAddress", ex);
}


thank all
kidotai
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Dec 16, 2009 1:53 pm

Top

Postby Sullen » Thu Dec 17, 2009 8:15 am

Try to use [url=http://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.html]ContactsContract.CommonDataKinds
[/url] in order to get appropriate data.
Sullen
Freshman
Freshman
 
Posts: 2
Joined: Wed Dec 16, 2009 2:18 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 6 guests