/** * @since Available in iOS 9.0 and later. */ public static NSObject observeDidChange(CNContactStore object, final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.run(); } }); } }
public boolean enumerateContacts(CNContactFetchRequest fetchRequest, VoidBlock2<CNContact, BooleanPtr> block) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = enumerateContacts(fetchRequest, ptr, block); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; }
@Method(selector = "executeSaveRequest:error:") private native boolean executeSaveRequest(CNSaveRequest saveRequest, NSError.NSErrorPtr error); @Method(selector = "defaultContainerIdentifier")
@Method(selector = "groupsMatchingPredicate:error:") private native NSArray<CNGroup> getGroupsMatchingPredicate(NSPredicate predicate, NSError.NSErrorPtr error); public NSArray<CNContainer> getContainersMatchingPredicate(NSPredicate predicate) throws NSErrorException {
@Method(selector = "unifiedContactsMatchingPredicate:keysToFetch:error:") private native NSArray<CNContact> getUnifiedContactsMatchingPredicate(NSPredicate predicate, @org.robovm.rt.bro.annotation.Marshaler(CNContactPropertyKey.AsListMarshaler.class) List<CNContactPropertyKey> keys, NSError.NSErrorPtr error); public CNContact getUnifiedContact(String identifier, List<CNContactPropertyKey> keys) throws NSErrorException {
@Method(selector = "unifiedContactWithIdentifier:keysToFetch:error:") private native CNContact getUnifiedContact(String identifier, @org.robovm.rt.bro.annotation.Marshaler(CNContactPropertyKey.AsListMarshaler.class) List<CNContactPropertyKey> keys, NSError.NSErrorPtr error); @Method(selector = "enumerateContactsWithFetchRequest:error:usingBlock:")
@Method(selector = "containersMatchingPredicate:error:") private native NSArray<CNContainer> getContainersMatchingPredicate(NSPredicate predicate, NSError.NSErrorPtr error); public boolean executeSaveRequest(CNSaveRequest saveRequest) throws NSErrorException {
@Method(selector = "groupsMatchingPredicate:error:") private native NSArray<CNGroup> getGroupsMatchingPredicate(NSPredicate predicate, NSError.NSErrorPtr error); public NSArray<CNContainer> getContainersMatchingPredicate(NSPredicate predicate) throws NSErrorException {
@Method(selector = "unifiedContactsMatchingPredicate:keysToFetch:error:") private native NSArray<CNContact> getUnifiedContactsMatchingPredicate(NSPredicate predicate, @org.robovm.rt.bro.annotation.Marshaler(CNContactPropertyKey.AsListMarshaler.class) List<CNContactPropertyKey> keys, NSError.NSErrorPtr error); public CNContact getUnifiedContact(String identifier, List<CNContactPropertyKey> keys) throws NSErrorException {
@Method(selector = "unifiedContactWithIdentifier:keysToFetch:error:") private native CNContact getUnifiedContact(String identifier, @org.robovm.rt.bro.annotation.Marshaler(CNContactPropertyKey.AsListMarshaler.class) List<CNContactPropertyKey> keys, NSError.NSErrorPtr error); @Method(selector = "enumerateContactsWithFetchRequest:error:usingBlock:")
@Method(selector = "containersMatchingPredicate:error:") private native NSArray<CNContainer> getContainersMatchingPredicate(NSPredicate predicate, NSError.NSErrorPtr error); public boolean executeSaveRequest(CNSaveRequest saveRequest) throws NSErrorException {
/** * @since Available in iOS 9.0 and later. */ public static NSObject observeDidChange(CNContactStore object, final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.run(); } }); } }
public boolean enumerateContacts(CNContactFetchRequest fetchRequest, VoidBlock2<CNContact, BooleanPtr> block) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = enumerateContacts(fetchRequest, ptr, block); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; }
@Method(selector = "groupsMatchingPredicate:error:") private native NSArray<CNGroup> getGroupsMatchingPredicate(NSPredicate predicate, NSError.NSErrorPtr error); public NSArray<CNContainer> getContainersMatchingPredicate(NSPredicate predicate) throws NSErrorException {
@Method(selector = "unifiedContactsMatchingPredicate:keysToFetch:error:") private native NSArray<CNContact> getUnifiedContactsMatchingPredicate(NSPredicate predicate, @org.robovm.rt.bro.annotation.Marshaler(CNContactPropertyKey.AsListMarshaler.class) List<CNContactPropertyKey> keys, NSError.NSErrorPtr error); public CNContact getUnifiedContact(String identifier, List<CNContactPropertyKey> keys) throws NSErrorException {
@Method(selector = "unifiedContactWithIdentifier:keysToFetch:error:") private native CNContact getUnifiedContact(String identifier, @org.robovm.rt.bro.annotation.Marshaler(CNContactPropertyKey.AsListMarshaler.class) List<CNContactPropertyKey> keys, NSError.NSErrorPtr error); @Method(selector = "enumerateContactsWithFetchRequest:error:usingBlock:")
@Method(selector = "executeSaveRequest:error:") private native boolean executeSaveRequest(CNSaveRequest saveRequest, NSError.NSErrorPtr error); @Method(selector = "defaultContainerIdentifier")
@Method(selector = "containersMatchingPredicate:error:") private native NSArray<CNContainer> getContainersMatchingPredicate(NSPredicate predicate, NSError.NSErrorPtr error); public boolean executeSaveRequest(CNSaveRequest saveRequest) throws NSErrorException {
/** * @since Available in iOS 9.0 and later. */ public static NSObject observeDidChange(CNContactStore object, final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.run(); } }); } }
public boolean enumerateContacts(CNContactFetchRequest fetchRequest, VoidBlock2<CNContact, BooleanPtr> block) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = enumerateContacts(fetchRequest, ptr, block); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; }