Contacts Android Versions Save

Android Contacts API Library written in Kotlin with Java interoperability. No more ContentProviders and cursors. Say goodbye to ContactsContract. Build your own contacts app!

0.1.8

2 years ago

This release contains bug fixes, optimizations, API changes (for a cleaner API), and Java support enhancements. All of these things were discovered while writing Howto pages ❤️

Bug Fixes

  1. #108 The GroupsUpdate API no longer allows groups in the same Account to have duplicate titles.
    • This is the same behavior as the GroupsInsert API.

Optimizations

  1. Internally, the GroupsInsert API now only retrieves groups for Accounts that are related to the groups being inserted.
    • This is a minor performance improvement, but an improvement nonetheless!

Non-breaking API Changes

  1. Exposed the CustomDataRegistry.allFields() function to consumers.
    • This allows consumers to include all integrated custom fields in one call explicitly in query, insert, and update APIs.

Breaking API Changes

  1. The Accounts API is now accessible via the Contacts API.
    • Previously, to access the Accounts API, Accounts(context).
    • Now, to access the Accounts API, Contacts(context).accounts().
    • This streamlines all core APIs to be accessible via the Contacts API.
  2. The GlobalCustomDataRegistry has been removed.
    • The same has been applied to handle name and gender custom data modules.
    • This streamlines custom data integration to use only one instance of CustomDataRegistry per instance of Contacts.
    • This also makes things less error-prone.
  3. All extension functions in the contacts.core.util package and the corresponding functions in the async module now take a reference to the Contacts API instance instead of Context and CustomDataRegistry.
    • The same has been applied to handle name and gender custom data modules.
    • This streamlines all extension functions to use a reference to the Contacts instead of separate references to a Context and a CustomDataRegistry. Less arguments, the better!
    • This also makes things less error-prone.

Please keep in mind that releases below v1.0.0 may contain breaking changes!!! Anything below the semantic version v1.0.0 are implicitly experimental/non-stable. Backwards compatibility and deprecations will not be exercised until after v1.0.0 (the first true production release version) in order to keep the library clean and easy to change 😁

Java support enhancements

  1. Added @JvmStatic fun all() and @JvmStatic fun forMatching() for all object FieldSet to give Java users first-class access to all and forMatching properties in a similar way as Kotlin users.
    • The same has been applied to handle name and gender custom data modules.

Documentation

  1. Cleaned up some in-code KDocs.
  2. Wrote up a bunch more howto pages.

New Contributors!

I'm excited to have the very first (other than @vestrel00) contributor to this will-be-legendary library!!! 🔥🔥🔥🔥

FYI ❤️

You may have noticed that most of the above changes do not have a corresponding issue, which would have provided a lot more context and a paper trail to the related code changes. I need to keep in mind that this is now an open source project. Other people are looking at my work now, and perhaps even consuming it!

Therefore, in order to uphold some form of professionalism, all changes in future releases will have issues! It will also help in creating these release notes with the "Auto-generate release notes" button.

Full Changelog

https://github.com/vestrel00/contacts-android/compare/0.1.7...0.1.8

0.1.7

2 years ago

This release is full of big API improvements!

  1. Fixed queries inadvertently including unspecified fields.
    • Previously, some fields were being inadvertently included in query results due to the generic column names set by the ContactsContract. That is no longer the case!
  2. Added include functions to insert and update APIs.
    • Similar to query APIs, insert and update APIs now provide an includes function that allows you to specify which fields should be a part of the insert or update operation. All other fields are ignored.
  3. Added Contact.hasPhoneNumber field and wrote up documentation about matching contacts with no particular kind of data.

More info in How do I include only the data that I want?.

Full Changelog: https://github.com/vestrel00/contacts-android/compare/0.1.6...0.1.7

0.1.6

2 years ago

Fixed Event date not handling no-year, minor code prettification, and wrote up several howto pages.

  • Fixed Event.date not handling no-year option.
  • MutableCommonDataEntity implementations are now using property delegate for primaryValue.
  • Wrote up howto pages for basic and advanced queries and others.

0.1.5

2 years ago

Added groupMemberships aggregation extension function in ContactData.

The groupMemberships aggregation extension functions were previously commented out because it may be unsafe for consumers to use as it may cause confusion to those unfamiliar with how Groups and GroupMemberships worked.

However, having these extensions may prove to be useful when showing group memberships of multiple raw contacts to matching Groups from different accounts.

a lot of documentation in the extension function is provided to minimize risk of misuse and confusion =)

0.1.4

2 years ago

Exposed photoUri and photoThumbnailUri in ContactsEntity.

The photoUri and photoThumbnailUri in ContactsEntity we’re previously commented out to force users to use the ContactPhoto extensions. However, it has now been uncommented as it may be useful for showing contact photos in a list/recycler view…

0.1.3

2 years ago

Fixed query order by functions causing lint warnings for Java consumers.

Fixes lint raising an issue for API query functions of the form fun x(vararg y: Type<Generic>)

The fix was to add the @SafeVarargs function annotation

0.1.2

2 years ago

Fixed Jitpack artifacts not being generated.

The previous release was not generating the artifacts when publishing to maven….

It’s fixed now though =)

0.1.1

2 years ago

Java version is now back to 7 and lots more documentation

The Java version was previously set (recently) to Java 8 for no reason. This release reverts that change. Java version is now back to 7!

Plus some more documentation!

0.1.0

2 years ago

Ready for public alpha development .

Most, if not all, v1 functions have been implemented and manually tested by me.

0.1.x will be focused on making sure everything is documented. This includes writing howto guides for everything!