title: What is ContactsContract.Groups.ACCOUNT_NAME/TYPE for?
body: <p>When trying to create a new Contact group, I found that the new group cannot be seen in the mobile, unless I set <code>ContactsContract.Groups.ACCOUNT_NAME and ACCOUNT_TYPE</code>:</p>
  
  <pre><code>ArrayList&lt;ContentProviderOperation&gt; o = new ArrayList&lt;ContentProviderOperation&gt;();
  o.add(ContentProviderOperation.newInsert(Groups.CONTENT_URI)
        .withValue(ContactsContract.Groups.TITLE, groupTitle)
        .withValue(ContactsContract.Groups.GROUP_VISIBLE, true)
        .withValue(ContactsContract.Groups.ACCOUNT_NAME, "local@ztespecial_local.com") // without these two lines the new group will not be shown
        .withValue(ContactsContract.Groups.ACCOUNT_TYPE, "local@ztespecial_local.com")
        .build());
  try {
      getContentResolver().applyBatch(ContactsContract.AUTHORITY, o);
  } catch (Exception e) {
      Log.e("ContactsManager", "Failed to create new contact group: "+e);
      return;
  }
  </code></pre>
  
  <p>By listing all groups, I found that all groups which <code>ACCOUNT_TYPE/NAME</code> is null will not be seen in system's Contact application, even its <code>Groups.VISIBLE</code> is true.</p>
  
  <p>Is there a guideline that what value I should set for a new group?</p>