v0.3.2 - New features for disabling validation checks in read/write APIs, improvements for Insert API, bug fixes, and a small breaking change
This release contains functions that give you more control over Account, Group, and Include field validation checks in read/write APIs. Apart from that, this comes with related improvements and some bug fixes. There's a minor breaking change that might affect you if you have created your own custom data.
π‘ New features
- Implement a new
InsertAPI function (commitInChunks) that allows users to insert large numbers of new RawContacts much faster thancommit#329, documentation - Add option to disable Account validation checks in
InsertandProfileInsertAPIs #318, documentation - Add option to disable Account validation checks in
MoveRawContactsAcrossAccountsAPI #319, documentation - Add option to disable GroupMembership validation checks in
InsertandProfileInsertAPIs #320, documentation - Add option to disable included field validation checks in all insert, update, and query APIs #321, documentation
π οΈ Improvements
- The
InsertAPI now only queries Groups internally at most once regardless of the quantity of RawContacts being inserted #330 - The
InsertAPI now only queries Accounts internally at most once regardless of the quantity of RawContacts being inserted #332 - The
InsertAPI now skips processing GroupMemberships of RawContacts that specified no GroupMemberships #331 - The
InsertAPI no longer adds an update Options operation for RawContacts that has null Options #333 - Allow
SimContactsInsertandSimContactsUpdateto be cancelled during calculation of max character limits #327
π Bug fixes
InsertAPI includesRawContactsFields(AccountName, AccountType, SourceId) even when not included #325AccountQueryAPI returns all available/visible accounts ifandroid.permission.GET_ACCOUNTSis NOT explicitly granted, regardless of values passed towithTypes#338
π£ Breaking changes
- Included custom data field sets are now nullable #324
Refactors
- Refactor
Contacts.insertSimContactfunction inSimContactsInsert.ktfrom public to internal #328
π§ Migrating from 0.3.1 -> 0.3.2
Included custom data field sets are now nullable #324
Fix compile errors by making Set<AbstractCustomDataField> nullable -> Set<AbstractCustomDataField>?
For example, change this...
internal class HandleNameMapperFactory {
override fun create(
... includeFields: Set<HandleNameField>
) = HandleNameMapper(HandleNameDataCursor(cursor, includeFields))
}
to this...
internal class HandleNameMapperFactory {
override fun create(
... includeFields: Set<HandleNameField>?
) = HandleNameMapper(HandleNameDataCursor(cursor, includeFields))
}
ποΈ Full Changelog
https://github.com/vestrel00/contacts-android/compare/0.3.1...0.3.2
π£οΈ Discuss this release
Head on over to the v0.3.2 Release Checklist and leave a comment and/or some reactions π π