Contacts
class Contacts
Methods for contacts.
Types
Functions
Link copied to clipboard
Ensure contacts information is up-to-date with the given contact source.
Link copied to clipboard
Link copied to clipboard
Get the avatar of a contact in the given source.
Link copied to clipboard
Get the thumbnail of avatar of a contact in the given source.
Link copied to clipboard
Return how many bits are used to identify contact blocks in the given source When n bits are used, the internal storage has contacts divided into 2ⁿ blocks.
Link copied to clipboard
Whether the contacts are being loaded.
Link copied to clipboard
Get number of contacts in a given contact source.
Get number of contacts for a query in a given contact source.
Link copied to clipboard
open fun getSections(@NonNull source: ContactSourceType, @NonNull ids: Set<String>): Array<ContactSection>
Get sections for full alphabetical sequence of contacts from the given source.
open fun getSections(@NonNull source: ContactSourceType, @NonNull query: ContactQuery): Array<ContactSection>
Get sections for full alphabetical sequence of contacts from the given source
Link copied to clipboard
Get all the sources which are configured and valid.
Link copied to clipboard
Get checksum of all contacts from the given source in storage.
Link copied to clipboard
open fun iterateAlphabetically(@NonNull source: ContactSourceType, @IntRange(from = 0) from: Int): ContactIterator
open fun iterateAlphabetically(@NonNull source: ContactSourceType, @IntRange(from = 0) from: Int, @IntRange(from = "-1") limit: Int): ContactIterator
Iterate contacts from the given source in alphabetical order.
open fun iterateAlphabetically(@NonNull source: ContactSourceType, @NonNull query: ContactQuery): ContactIterator
open fun iterateAlphabetically(@NonNull source: ContactSourceType, @NonNull query: ContactQuery, @IntRange(from = 0) from: Int): ContactIterator
open fun iterateAlphabetically(@NonNull source: ContactSourceType, @NonNull query: ContactQuery, @IntRange(from = 0) from: Int, @IntRange(from = "-1") limit: Int): ContactIterator
Iterate a set of contacts from the given source in alphabetical order.
Link copied to clipboard
open fun iterateUnordered(@NonNull source: ContactSourceType, @IntRange(from = 0) from: Int): ContactIterator
open fun iterateUnordered(@NonNull source: ContactSourceType, @IntRange(from = 0) from: Int, @IntRange(from = "-1") limit: Int): ContactIterator
Iterate contacts from the given source without any specific order.
Link copied to clipboard
open fun search(@NonNull query: IndexQuery, @IntRange(from = 0) limit: Int, resolveSpans: Boolean): Array<IndexMatch>
Perform a full-text search in contact storage.
open fun search(@NonNull query: IndexQuery, @IntRange(from = 0) limit: Int, resolveSpans: Boolean, @Nullable searchText: String): Array<IndexMatch>
Link copied to clipboard
open fun setAuxiliary(@NonNull source: ContactSourceType, @NonNull id: String, @Nullable auxiliary: Json.Dict): Boolean
Set auxiliary data to a contact in the given source The stored JSON dictionary is accessible under key AUXILIARY.