Integrate Your App with the Samsung SignIn SDK
Before you begin using the Samsung SignIn SDK, you must integrate your app. Do the following:
- Add the AAR as a dependency to your project.
- Configure the SamsungSignIn object.
Add AAR as a dependency
-
Go to File > Project Structure > Dependencies.
-
In the Declared Dependencies tab, click + and select JAR/AAR Dependency from the menu.
-
In the Add Jar/Aar Dependency dialog, enter the path to the
SamsungSignInSdk-{version name}.aar
file, then select the configuration to which the dependency applies.If the library should be available to all configurations, select the implementation configuration.
-
Check your app’s
build.gradle
file to confirm that a declaration similar to the following appears:
dependencies {
implementation files ('lib/SamsungSignInSdk-1.0.0.aar)
}
Configure the SamsungSignIn object
In your sign-in activity's onCreate
method, create a SamsungSignIn object with your client ID.
// Insert the client ID obtained from the Samsung Account Console.
val samsungSignIn: SamsungSignIn = SamsungSignIn.getInstance(CLIENT_ID, this)