2.2.0.0 and Later

Changed package names

All public entities are now located in the com.tapkey.mobile package.

TapkeyServiceFactory

The Tapkey service factory (and the Tapkey service factory builder) have been reworked to provide a simpler interface. All changes can be found in the table below.

Before 2.2.0.0 From 2.2.0.0 on
AnalyticsManager Removed
AsyncScheduler Removed
BleLockManager BleLockScanner + BleLockCommunicator
CloudMessagingManager Removed
CommandExecutionFacade CommandExecutionFacade
ConfigManager Removed
CookieManager Removed
DataContext Removed
DeviceManager Removed
FirmwareManager FirmwareManager
IdentityProviderRegistration Removed
KeyManager KeyManager
NotificationManager NotificationManager
OwnerManager Removed
PollingManager Removed
PreferencesControlManager Removed
PreferencesManager Removed
RestHandler Removed
ServerClock Removed
UriFactory Removed
UserManager UserManager
UserSettings Removed
- SupportManager

BleLockManager

The BleLockManager class has been split into two separate components: A BLE lock scanner and a BLE lock communicator.

The BLE lock scanner (com.tapkey.mobile.ble.BleLockScanner) provides means to scan for Tapkey locks via BLE. It can be used to scan for nearby locks and to determine whether a specific lock is nearby. Use TapkeyServiceFactory to retrieve an instance of BleLockScanner. Background scanning has been removed at all.

The BLE lock communicator (com.tapkey.mobile.ble.BleLockCommunicator) provides means to communicate with Tapkey locks via BLE. It can be used to send commands to locks. Use TapkeyServiceFactory to retrieve an instance of BleLockCommunicator.

KeyManager

The key manager's interface has been simplified and only offers two methods:

  • queryLocalKeysAsync(String userId, boolean forceUpdate, CancellationToken cancellationToken)
  • getKeyUpdateObservable()

Users and UserManager

Authentication has been reworked in the 2.2.0.0 release. The SDK no longer handles users as complex objects. All methods that returned a User are now returning a String with the user's ID. All parameters that accepted a User are now accepting a String with the user's ID. Furthermore, authentication is no longer a part of the mobile SDK. Instead, the SDK takes a Tapkey access token to "log in" a user to the SDK instance on the present device. The reworked user manager (com.tapkey.mobile.manager.UserManager) essentially provides the following two methods

  • logInAsync(String accessToken, CancellationToken cancellationToken)
  • logOutAsync(String userId, CancellationToken cancellationToken)

to handle user login and logout. This means that implementors have to obtain a Tapkey access token on their own, using one of the OAuth grant types supported by Tapkey. In most cases, this will be the Token Exchange grant type.

The SDK uses the token refresh handler (com.tapkey.mobile.auth.TokenRefreshHandler) to request a new access token from the implementing application. The token refresh handler is passed to the SDK using TapkeyServiceFactoryBuilder#setTokenRefreshHandler(TokenRefreshHandler tokenRefreshHandler).

PushNotificationReceiver

PushNotificationReceiver has been renamed to PollingScheduler.

TapkeyServiceFactoryBuilder

The Tapkey service factory builder exposes a new setter that accepts a token refresh handler as described above.

SupportManager

The new support manager exposes a method that will return information about the current SDK state that can be used for troubleshooting. Note that the information returned might contain sensitive data.