Integrate Your App with the Samsung SignIn SDK

Before you begin using the Samsung SignIn SDK, you must integrate your app. Do the following:

  1. Add the AAR as a dependency to your project.
  2. Configure the SamsungSignIn object.

Add AAR as a dependency

  1. Go to File > Project Structure > Dependencies.

  2. In the Declared Dependencies tab, click + and select JAR/AAR Dependency from the menu.

  3. 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.

  4. 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)