تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
قبل البدء في دمج ميزة "Smart Lock لكلمات المرور" في تطبيقك، فعِّل حزمة تطوير البرامج (SDK) لخدمات Play في مشروع Android Studio. توضّح الخطوات التالية كيفية دمج ميزة "Smart Lock لكلمات المرور" في تطبيقك.
المتطلبات الأساسية
يتطلّب استخدام ميزة "Smart Lock لكلمات المرور" على Android ما يلي:
جهاز Android متوافق يعمل بالإصدار 6.0 أو الإصدارات الأحدث من Android ويتضمّن "متجر Google Play" أو محاكيًا يتضمّن جهاز Android افتراضيًا يعمل بمنصة Google APIs استنادًا إلى الإصدار 4.2.2 أو الإصدارات الأحدث من Android ويتضمّن الإصدار 15.0.0 أو الإصدارات الأحدث من "خدمات Google Play"
أحدث إصدار من حزمة تطوير البرامج (SDK) لنظام التشغيل Android، بما في ذلك مكوّن "أدوات حزمة تطوير البرامج"
تتوفّر حزمة تطوير البرامج (SDK) من خلال أداة إدارة حزمة تطوير البرامج (SDK) لنظام التشغيل Android في "استوديو Android".
يجب أن يكون المشروع مضبوطًا على التجميع باستخدام الإصدار 6.0 (Marshmallow) أو إصدار أحدث من Android.
هذا الدليل مخصّص لمستخدمي "استوديو Android"، وهو بيئة التطوير المقترَحة.
ضبط إعدادات مشروع "استوديو Android"
يتطلّب دمج ميزة "Smart Lock لكلمات المرور" في تطبيق Android استيراد مكتبة "خدمات Google Play" والإشارة إليها في مشروعك على "استوديو Android". أضِف السطر التالي إلى قسم dependencies في ملف build.gradle ضمن وحدة التطبيق:
تاريخ التعديل الأخير: 2025-09-04 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-09-04 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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,["# Start integrating Smart Lock for Passwords into your Android app\n\n| **Deprecated:** Smart Lock for Passwords is deprecated. To ensure the continued security and usability of your app, [migrate to\n| Credential Manager](https://developer.android.com/training/sign-in/passkeys/) today. Credential Manager supports passkey, password, and federated identity authentication (such as Sign-in with Google), stronger security, and a more consistent user experience.\n\nBefore you start integrating Smart Lock for Passwords\ninto your app, enable the Play Services SDK in your\nAndroid Studio project. [Next steps](#next_steps) describes how to integrate\nSmart Lock for Passwords into your app.\n\nPrerequisites\n-------------\n\nSmart Lock for Passwords on Android requires the following:\n\n- A compatible Android device that runs Android 6.0 or newer and includes the Google Play Store or an emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or newer and has Google Play services version 15.0.0 or newer.\n- The latest version of the Android SDK, including the SDK Tools component. The SDK is available from the **Android SDK Manager** in Android Studio.\n- A project configured to compile against Android 6.0 (Marshmallow) or newer.\n\nThis guide is written for users of Android Studio, which is the recommended\ndevelopment environment.\n\nConfigure your Android Studio project\n-------------------------------------\n\nIntegrating Smart Lock for Passwords in your Android\napp requires you to import and reference the Google Play services library in\nyour Android Studio project. Add the following line to the `dependencies`\nsection of the `build.gradle` file in your application module: \n\n implementation 'com.google.android.gms:play-services-auth:21.4.0'\n\nNext steps\n----------\n\nNow that you have configured your project,\nyou can [retrieve user credentials](/identity/smartlock-passwords/android/retrieve-credentials)\nand use them to sign users in your app."]]