4
salut je besoin pour obtenir le nom de l'entreprise du contact de l'organisation-je utiliser ce code pour obtenir l'organisation détailsObtenez les détails de l'organisation de contact dans android?
String orgWhere = ContactsContract.Data.CONTACT_ID + " = ? AND " + ContactsContract.Data.MIMETYPE + " = ?";
String[] orgWhereParams = new String[]{contactId,
ContactsContract.CommonDataKinds.Organization.CONTENT_ITEM_TYPE};
Cursor orgCur = cr.query(ContactsContract.Data.CONTENT_URI,
null, orgWhere, orgWhereParams, null);
while (orgCur.moveToNext()) {
String orgName = orgCur.getString(orgCur.getColumnIndex(ContactsContract.CommonDataKinds.Organization.DATA));
String title = orgCur.getString(orgCur.getColumnIndex(ContactsContract.CommonDataKinds.Organization.TITLE));
System.out.println(orgName+title);
companyname_one.add(orgName);
System.out.println(companyname_one+"new");
}
orgCur.close();
en utilisant ce code je ne reçois que le nom de l'entreprise du nom de contact du contact. Comment puis-je obtenir le détail de l'entreprise de tous les contacts?
merci, il a travaillé – Ramz