AIR Native Extension for work with Contacts/AddressBook.
- Works in Syncronous and Asyncronous modes
- Provides almost all properties defined in iOS' AddressBook (List of supported properties)
- Adobe AIR 3.6
- iOS 6.1
// checks if AddressBook is modified in sync mode
var isAddressBookChanged:Boolean = Contacts.getInstance().isModified(new Date());
...
// request first 100 or all contacts in async mode
Contacts.getInstance().getContactsAsync(new Range(0, 100), null,
new Response(
function(contacts:Array):void
{
trace("contacts from 0 to 100:", contacts);
},
function (info:Object):void
{
trace(info)
})
);
TBD
- Port to Android
- Support all properties for iOS
- TBD
The contacts extension could operate with Address Book in syncronous and asyncronous mode. Each syncronous method has asyncronous counterpart with name that end on Async string. For detailed description see API reference.
Some techniques and code has been borrowed from Memler's ContactEditor and its FreshPlanet fork