incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert La Ferla (Commented) (JIRA)" <>
Subject [jira] [Commented] (CB-223) Add support for iOS contact groups
Date Mon, 13 Feb 2012 05:33:24 GMT


Robert La Ferla commented on CB-223:

Thanks Becky.  Let me recommend a slightly different approach.  Instead of locating the groups/categories
for a given contact (which I agree is inefficient for implementation reasons), a more efficient
approach is a method that gets a list of contacts for a given group/category.  While it would
be ideal if the individual contacts then had all the categories/groups set, they don't currently.
 Implementing my proposal, developers will at least have one way to get at the group information
in the main API.

These methods represent a minimum API that "augments" the existing Contacts API:

(1) get a list of groups/categories

navigator.contacts.findgroups(groupSuccess, groupError)

function onSuccess(groups) {
    alert('Found ' + groups.length + ' groups.');

function onError(groupError) {

(2) get a list of contacts for a specific group/category.

navigator.contacts.getgroup(groupname, contactSuccess, contactError)

function onSuccess(contacts) {
    alert('Found ' + contacts.length + ' contacts.');

function onError(contactError) {

> Add support for iOS contact groups
> ----------------------------------
>                 Key: CB-223
>                 URL:
>             Project: Apache Callback
>          Issue Type: New Feature
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: iOS
>            Reporter: Robert La Ferla
>            Assignee: Shazron Abdullah
>            Priority: Minor
>              Labels: addressbook, categories, contacts, groups, ios
> Contacts on iOS are organized by group.  There is the default group "All Contacts" plus
any custom groups that the user set up.  Contacts retrieved by Apache Cordova / phonegap do
not contain which group they are in. 
> I believe that iOS groups are analogous to phonegap contact categories and thus should
be mapped to them.  If not, another property should be created.
> From the Cordova docs:
> "categories: An array of all the contacts user defined categories. (ContactField[])"
> In the iOS AddressBook API, the function ABAddressBookCopyArrayOfAllGroups() gets the
list of groups.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message