java - How to get the account type name and icon for a contact list group? -


I am able to recover a list of contact groups from Android's contact provider using this segment of code:

  // Create a string array with fields to retrieve for the last string [] of each group. Processing = New String [] {ContactsContract.Groups._ID, ContactsContract.Groups.TITLE, ContactsContract.Groups.ACCOUNT_NAME, ContactsContract Group.ACSSTYPE}; // Create cursor to iterate on groups cursor groupcore = reference. Telecommunication Receiver () Query (contact group.contENT_URI, group projection, empty, zero, empty);   

On recovery, I want to show a list of groups to the user, and with the result, show the account type icon (for example, the account type com.google I want to display Google's icon, Facebook icon for Facebook accounts ...).

How do I get the icon of each account type without adding the ACCOUNT_MANAGER permission?

  if (groupers .getcount ()> gt; {while (groupCursor .moveToNext) ()) {String ID = Cursor groups .getString (cur .colcolumnIndex (BaseColumns._ID)); String icon = groupers .getString (do .getColumnIndex (ContactsContract.Contacts.ICON)); // get more column values ​​of each contact}}    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -