Migrating to v7.0
This latest release brings a number of updates to the extension particularly around the Android integration.
It also brings a complete rewrite of the Android implementation to use the latest Google credential and authorisiation libriaries.
The iOS implementation has been updated to v8.0.0 however the implementation remains largely unchanged.
Android Integration
Gradle Dependencies
We have moved to using gradle dependencies within our extensions which will improve dependency resolution, reduce update times and improve compatibility with other extensions.
This also reduces the amount of work required to manually integrate the extensions, reducing the additions to the manifest in your application descriptor.
We highly recommend using the apm tool to manage the integration of the extensions in your application and to generate your application descriptor:
apm update
apm generate app-descriptor
However, you can still integrate the manifest additions manually if you prefer. With this update we recommend starting fresh as there have been a lot of entries to be removed.
Updating code
The main changes required to update your code are around the setup of the extension.
You are now required to supply the web client ID to sign in with Google on Android so you must ensure you call setAndroidServerClientID()
with your web client id:
var options:GoogleIdentityOptions = new GoogleIdentityOptionsBuilder()
.requestEmail()
.setIOSClientID( IOS_CLIENT_ID )
// Add the web client id for android
.setAndroidServerClientID( WEB_CLIENT_ID )
.build();
GoogleIdentity.service.setup( options );
Updating the manifest
You can simplify the manifest now as well as the gradle implementation will add a significant amount of the required manifest entries for you.
If you use the apm
tool to generate your application descriptor you will see the manifest entries are significantly reduced and simply running the commands above will update the manifest for you.
If you manually update the manifest then, as mentioned above, we recommend starting fresh as there have been a lot of entries to be removed. The minimum manifest additions now looks like the following:
<manifest android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application>
<activity android:name="com.distriqt.core.auth.AuthorisationActivity" android:exported="false" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
</application>
</manifest>