cloud-sdk-android

PACE Cloud SDK – Android

This framework combines multipe functionalities provided by PACE i.e. authorizing via PACE ID or requesting and displaying Apps. These functionalities are separated and structured into different Kits by namespaces, i.e. IDKit, AppKit and POIKit.

Documentation

The full documentation and instructions on how to integrate PACE Cloud SDK can be found here

Source code

The complete source code of the SDK can be found on GitHub.

Specifications

PACECloudSDK currently supports Android 6.0 (API level 23) and above.

It uses the following dependencies:

Migration

From 2.x.x to 3.x.x

In 3.0.0 we’ve introduced a universal setup method: PACECloudSDK.setup(context: Context, configuration: Configuration) and removed the setup for AppKit and POIKit.

The universal Configuration almost has the same signature as the previous AppKit Configuration, only the isDarkTheme parameter has been removed, which is now an enum instead of a Boolean and defaults to Theme.LIGHT. In case you want to change it, you can set it via AppKit’s theme property: AppKit.theme = Theme.LIGHT/Theme.DARK.

From 7.x.x to 8.x.x

We’ve added two new AppCallbacks: getAccessToken and logout. The getAccessToken method replaces the invalidToken call. While its callback is equal to the invalidToken callback, we changed the response to be an object with an accessToken property and a new isInitialToken boolean.

The logout callback is used to handle the logout natively. Please refer to Native login, token renewal and logout for more information.

Also from now on this callback will only be sent if IDKit is not used/set up. If you’re using IDKit the SDK will now first try to renew the session automatically. If the renewal fails there is a new fun onSessionRenewalFailed(throwable: Throwable?, onResult: (String?) -> Unit) AppCallback that you may implement to specify your own behavior to retrieve a new access token. To implement this method pass an AppCallbackImpl instance to AppKit.openApps(...) or AppKit.openAppActivity(...) and override onSessionRenewalFailed. If either this method is not implemented or you didn’t pass an AppCallbackImpl instance at all the SDK will automatically perform an authorization hence showing a sign in mask for the user.

From 9.x.x to 10.x.x

We’ve moved everything that belongs to the GeoAPI from AppKit/API to POIKit:

From 10.x.x to 11.x.x

The IDKit setup has been combined with the general PACECloudSDK setup:

From 11.x.x to 12.x.x

The PACECloudSDK.setup() has been simplified:

From 12.x.x to 13.x.x

The connectedFuelingStatus property of the CofuGasStation is now nullable so that the Cofu gas station is not skipped in the cache loading if this property is absent in the API response. If you use the CofuGasStation object, keep in mind that the connectedFuelingStatus property can now be null.

From 13.x.x to 14.x.x

The GasStations properties paymentMethods, amenities, foods, loyaltyPrograms, postalServices, services, shopGoods and fuelType will now be from type string instead of enums. The client app has to then manage these values itself.

From 14.x.x to 15.x.x

From 15.x.x to 16.x.x

From 16.x.x to 17.x.x

From 17.x.x to 18.x.x

SDK API Docs

Here is a complete list of all our SDK API documentations: