Download sample app project
The A3L Authentication SDK download includes a sample app project in Java and Kotlin. You can download the SDK from SDKs and samples. The file contains an Android project which you can use to configure and build the sample app. When building the project, if you run into an “SDK location not found” error, add a line in the local.properties file at the root of the project to include your Android SDK location. For example:- On Windows, add the line:
sdk.dir=C:\\Users\\<username>\\AppData\\Local\\Android\\sdk - On Mac, add the line:
sdk.dir=/Users/<username>/Library/Android/sdk
<username> with your username.
Configure sample app
To configure the sample app, follow these steps.- Obtain the Android client ID and optionally the OAuth 2.0 client ID that are provided by the Google API Console. For details on how to fetch the IDs, see Configure Google API Console.
-
Open the app/src/res/values/strings.xml file and update the placeholder values for
app_client_idandserver_client_id.ReplacePREFIXwith the Android client ID prefix (the text before.apps.googleusercontent.com) and replaceSERVER_CLIENT_IDwith the OAuth2.0 client ID. -
Open the app’s build.gradle file. Update the placeholder value for
appAuthRedirectScheme.Replace<PREFIX>with the Android client ID prefix (the text before.apps.googleusercontent.com).
Test sample app
Use these steps to test the sample app.- After completing the configuration steps in the preceding section, build the app.
- Install the app on an Android device that has Google Play services enabled, or on a Fire OS device.
- Launch the app. The app displays the text A3L Auth and has a Sign in with Google button.
- Click Sign in with Google. The app redirects you to the sign-in flow, which depends on the device where the app was installed.
- After signing in, the app displays your profile details and two buttons, Revoke Access and Sign Out. Click the buttons to verify their functionality.

