LogoLogo
Github
  • 👋Welcome to Android-Credential-Manager Docs
  • 🖐️Getting Started
    • 🔧Installation
    • 📃Digitial Asset Linking
  • ➕Creating Credentials
    • Overview
    • Saving Username and Passwords
    • Creating a Passkey
    • Error Handling
  • 🧑‍💻Login Users
    • Overview
    • UserName and Password
    • Passkeys
    • Google Sign In
    • Error Handling
    • Performance Improvements
Powered by GitBook

2025 GuhanSenSam

On this page
  1. Getting Started

Installation

Installation Instructions

PreviousWelcome to Android-Credential-Manager DocsNextDigitial Asset Linking

Last updated 3 months ago

Getting Started

This package is designed to work inside Expo projects as it leverages the use of Expo Native Modules. Installation instructions have been provided for when it is used either in Expo CNG or if you have detached your project and are managing the native folders separately.

Installation in expo CNG is as easy as just directly installing the package through expo and regenerating your Android native directory. The following command installs this package.

npx expo install android-credential-manager

Once the installation has been completed, check out the following section on what digital asset linking is and how to configure it in your application.

If you have detached your project from expo CNG and are manually maintaining the native folders, follow these steps to install this package

1. Install the Package With Your Package Manager

npm install android-credential-manager

2. Add the Kotlin Dependencies

Add the following two dependencies inside your app-level build.gradle file.

app/build.gradle
dependencies {
    implementation("androidx.credentials:credentials:1.5.0-rc01")
    implementation("androidx.credentials:credentials-play-services-auth:1.5.0-rc01")
}

3. Edit your AndroidManifest.xml

Add the following to your AndroidManifest.xml file.

AndroidManifest.xml
<meta-data android:name="asset_statements" android:resource="@string/asset_statements" />

4. Configure Your Digital Asset Linking

Refer to

on what is Digital Asset Linking and how to create one.

5. Link DigitalAsset URL To Your App

Add the following code inside your strings.xml file. Make sure you update the domain to reflect the domain that you have used to hos the Digital Asset JSON as detailed in the previous step

strings.xml
<string name="asset_statements" translatable="false">
[{
  \"include\": \"https://signin.example.com/.well-known/assetlinks.json\"
}]
</string>

Add the Plugin to your app.json. Make sure you pass in your domain URL as instructed in the

{
  "expo": {
    "plugins": [
      [
        "android-credential-manager",
        {
          "domainUrl": "https://guhansensam.com"
        }
      ]
    ]
  }
}

Now you can run your app

To run your app locally use the following commands:

npm run android

This will regenerate your native android folder and build your application

If you use EAS build for your development run the following command

eas build

Then install the built APK onto your emulator or mobile device and start the expo Dev-client with the following command

npx expo start --dev-client

🖐️
🔧
📃Digitial Asset Linking
DigitalAsset Linking Section.