Upgrade to Digits 2.0ΒΆ

Note

It is important to note that Digits 2.0 supports Android 14+. Please do not upgrade to Digits 2.0 if your project needs to be built for Android versions less than 14.

Digits 2.0 removes deprecated methods, and introduces new methods that must be taken into consideration when upgrading from 1.x. The sections below outline these changes. A full list of changes can be viewed in the change log.

Digits deprecated constructor removed - now use Digits.Builder

  • [Removed] Removed the public Digits() constructor from the Digits class. Use the Digits.Builder() instead.
Fabric.with(this, new TwitterCore(authConfig), new Digits());

becomes

Fabric.with(this, new TwitterCore(authConfig), new Digits.Builder().build());

Removed deprecated authenticate methods on Digits

  • [Removed] Removed Digits.authenticate(String phoneNumber) from the Digits instance. Use the Digits.authenticate(AuthConfig authConfig) method instead.
Digits.authenticate(authCallback,"+34111111111");

becomes

AuthConfig.Builder authConfigBuilder = new AuthConfig.Builder()
                      .withAuthCallBack(authCallback)
                      .withPhoneNumber("+34111111111")

Digits.authenticate(authConfigBuilder.build());

Simplified public API by introducing an internal package

  • [Moved] Moved various internal-only classes to the internal package. Developers do not need to build with anything in the internal package, and thus it may be subject to breaking changes without a major release.
  • [Moved] Moved Logger’s events to events package.
  • [Moved] Moved model classes into models package.

Moved Friend Finder methods from ContactsClient to Digits instance

  • [Added] Added Digits.uploadContacts, Digits.deleteContacts, and Digits.findFriends methods to the Digits instance.
  • [Removed] Removed Digits.getContactsClient() was removed from the Digits instance. Use the static methods on the Digits instance instead.
  • [Removed] Removed public methods from the ContactsClient. Use the static methods on the Digits instance instead.
Digits.getInstance().getContactsClient().startContactsUpload();
Digits.getInstance().getContactsClient().lookupContactMatches(null, null, contactsCallback);
Digits.getInstance().getContactsClient().deleteAllUploadedContacts(deleteCallback);

becomes

Digits.uploadContacts();
Digits.findFriends(contactsCallback);
Digits.deleteContacts(deleteCallback);

Renamed DigitsAuthConfig to AuthConfig

  • [Renamed] Renamed DigitsAuthConfig to AuthConfig.

Removed deprecated methods on DigitsAuthConfig.Builder

  • [Removed] Removed DigitsAuthConfig.Builder.withThemeResId from the DigitsAuthConfig.Builder. Use the Digits.Builder().withTheme(int themeResId) method instead.