パスワード用スマートロックをアプリに統合する前に、Android Studio プロジェクトで Play 開発者サービス SDK を有効にします。次のステップでは、パスワード用スマートロックをアプリに統合する方法について説明します。
前提条件
Android の Smart Lock for Passwords には、次の要件があります。
Android 6.0 以降を搭載し、Google Play ストアを含む互換性のある Android デバイス、または Android 4.2.2 以降をベースとする Google API プラットフォームを実行し、Google Play 開発者サービス バージョン 15.0.0 以降を搭載する AVD を備えたエミュレータ。
このガイドは、推奨される開発環境である Android Studio のユーザーを対象としています。
Android Studio プロジェクトを構成する
Android アプリにパスワード用スマートロックを統合するには、Android Studio プロジェクトで Google Play 開発者サービス ライブラリをインポートして参照する必要があります。アプリ モジュールの build.gradle ファイルの dependencies セクションに次の行を追加します。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-10 UTC。"],[[["\u003cp\u003eSmart Lock for Passwords is deprecated and developers should migrate to Credential Manager for enhanced security and user experience.\u003c/p\u003e\n"],["\u003cp\u003eCredential Manager supports passkeys, passwords, and federated identity authentication, offering a more robust and unified approach to user credentials.\u003c/p\u003e\n"],["\u003cp\u003eIntegrating Smart Lock for Passwords previously required specific Android device and SDK prerequisites, including compatibility with Android 6.0 or newer and Google Play services.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers needed to configure their Android Studio project by adding the Google Play services library dependency to their build.gradle file before using Smart Lock for Passwords.\u003c/p\u003e\n"],["\u003cp\u003eRetrieving and utilizing user credentials for sign-in within the app was the next step after project configuration for Smart Lock for Passwords integration.\u003c/p\u003e\n"]]],[],null,[]]