Skip to main content

Android SDK Beta

Category
Android
Published

Our new Android SDK is here to ensure that your users enjoy a smooth, integrated sign-in experience, on any Android device.

In a world where users prefer different devices and often switch between them, having a consistent and convenient authentication experience across platforms is more important than ever.

Our Expo SDK has long enabled the creation of universal applications for Android, iOS, and the web using a single React codebase. However, we recognize that some customers prefer native SDKs for optimized performance, direct access to platform-specific features, and seamless integration with other native components.

That's why we’re excited to introduce Clerk Android (Beta)! The Clerk Android SDK is a toolkit designed to integrate Clerk’s authentication and user management services with applications made for the Android ecosystem. Built with Kotlin, the SDK adheres to modern standards, delivering the idiomatic and consistent developer experience you expect from Clerk.

Clerk Android is launching in beta today, with support for building fully custom sign-up and sign-in flows for Android devices. Along with the release, we're also sharing reference documentation and a quickstart to get you started.

Now, on to some highlights of the Clerk Android SDK...

Jetpack Compose

The Clerk Android SDK was built with Jetpack Compose in mind, allowing you to harness it's declarative approach to user interface on all Android platforms.

MainActivity.kt
@Composable
fun MainActivity() {
  Column {
    if(Clerk.user != null) {
      Text("Hello, ${Clerk.user.id}")
    } else {
      Text("You are signed out")
    }
  }
}

Coroutines

The Clerk Android SDK makes use of the latest in coroutines, allowing your code to be as readable and expressive as possible.

// Create a new sign up
scope.launch {
  val signUp = SignUp.create(SignUp.CreateParams.Standard(emailAddress = "newuser@clerk.com", password = "••••••••••"))

  // Send an email with a one time code
  // to verify the user's email
  signUp.prepareVerification(SignUp.PrepareVerificationParams.EmailCode)
}

Social Connections (OAuth)

Authenticate with your favorite social providers in just a few lines of code.

scope.launch {
  SignIn.authenticateWithRedirect(SignIn.AuthenticateWithRedirectParams.OAuth(provider = OAuthProvider.GOOGLE))
}

Session Management

Let the Clerk Android SDK take care of managing your user's authentication state so you can get back to building your app.

MainActivity.kt
@Composable
fun MainActivity() {
  Column {
    if(Clerk.session != null) {
      Text(Clerk.session.id)
    } else {
      Text("No session")
    }
  }

Building towards GA

As an official Clerk SDK, you can expect responsive support, even while in beta. Your feedback is critical during this testing period to ensure Clerk Android is the best it can be. If you have questions or want to talk to other users who are trying out the beta, join the Clerk Discord community.

Please note the SDK is currently in beta. Certain features - notably pre-built components, organizations, and magic links - are not yet implemented, but we're working on it. The full SDK is available on GitHub.

The API will likely undergo breaking changes until the 1.0.0 release.

Contributor
Sam Wolfand

Share this article