با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
دسته مرورگرها در نسخه بتا هستند
در این زمان، هر کسی میتواند مرورگرها را در مسیرهای آزمایش داخلی در فروشگاه Play منتشر کند. انتشار در مسیرهای تست بسته، تست باز و تولید در تاریخ بعدی مجاز خواهد بود.
این بخش راهنمایی در مورد نحوه استفاده از اعتبار دستگاه و APIهای احراز هویت سیستم برای برآورده کردن الزامات داده حساس که قبلاً توضیح داده شد ارائه می دهد.
بررسی کنید که آیا مجموعه اعتبار دستگاه وجود دارد یا خیر
برای تعیین اینکه آیا کاربر دستگاه خود را با پین، الگو یا رمز عبور ایمن کرده است، می توانید از روش KeyguardManager::isDeviceSecure استفاده کنید.
برای کاهش اصطکاک کاربر در مواردی که نیاز به تنظیم اعتبار دستگاه دارند، میتوانید صفحه امنیتی را در برنامه تنظیمات با استفاده از کنش Settings.ACTION_SECURITY_SETTINGS باز کنید.
برای درخواست از کاربر برای احراز هویت، میتوانید از BiometricPrompt API همانطور که در نمایش گفتگوی احراز هویت بیومتریک توضیح داده شده است استفاده کنید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Build browsers for Android Automotive OS\n\nThe Browsers category is in beta \nAt this time, anyone can publish browsers to internal testing tracks on the Play Store. Publishing to closed testing, open testing, and production tracks will be permitted at a later date. \n[Nominate yourself to be an early access partner →](https://forms.gle/VsXEdDEBidxw8q8u8) \n\nBeyond the requirements described in [Build parked apps for cars](/training/cars/parked) and [Add support for\nAndroid Automotive OS to your parked app](/training/cars/parked/automotive-os),\nthere are a few additional requirements specific to browsers that are detailed\non this page.\n| **Important:** Make sure your app meets the [quality guidelines for\n| browsers](/docs/quality-guidelines/car-app-quality?category=browser), as it is reviewed against them when submitted to tracks other than internal testing.\n\nAllow users to block access to sensitive data\n---------------------------------------------\n\nUnlike many Android devices, Android Automotive OS vehicles are often shared\ndevices. To give users the ability to protect their sensitive data such as\npasswords and payments information, browsers built for Android Automotive OS\n[must not save or allow access to passwords or payment information unless the\nuser can block access to passwords using a profile lock](/docs/quality-guidelines/car-app-quality?category=browser#SD-1).\nAuthentication can be accomplished either by using the device credential or by\nbuilding an authentication system within your app.\n\nAdditionally, before syncing sensitive data, browsers built for Android\nAutomotive OS [must prompt the user to authenticate and provide messaging to let\nthe user know that their data is being synchronized to the car](/docs/quality-guidelines/car-app-quality?category=browser#SD-2).\nIf the user does not have any method of authentication set up, you can prompt\nthem to set one up when they try to sync sensitive data, using either the\n[device credential](#open-settings) or one specific to your app.\n\nUse the device credential for authentication\n--------------------------------------------\n\nThis section provides guidance on how to use the device credential and\nsystem authentication APIs to meet the sensitive data requirements described\nprior.\n\n### Check if there is a device credential set\n\nTo determine if the user has secured their device with a PIN, pattern, or\npassword, you can use the [`KeyguardManager::isDeviceSecure`](/reference/android/app/KeyguardManager#isDeviceSecure())\nmethod. \n\n### Kotlin\n\n```kotlin\nval keyguardManager = context.getSystemService(KeyguardManager::class.java)\nval isDeviceSecure = keyguardManager.isDeviceSecure()\n```\n\n### Java\n\n```java\nKeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);\nboolean isDeviceSecure = keyguardManager.isDeviceSecure();\n```\n\n### Open the lock screen settings\n\nTo reduce user friction in the case they need to set a device credential, you\ncan open up the Security screen within the Settings app using the\n[`Settings.ACTION_SECURITY_SETTINGS`](/reference/android/provider/Settings#ACTION_SECURITY_SETTINGS)\nintent action. \n\n### Kotlin\n\n```kotlin\ncontext.startActivity(Intent(Settings.ACTION_SECURITY_SETTINGS))\n```\n\n### Java\n\n```java\ncontext.startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS))\n```\n\n### Prompt the user to authenticate\n\nTo prompt the user to authenticate, you can use the `BiometricPrompt` API as\ndescribed in [Show a biometric authentication dialog](/training/sign-in/biometric-auth).\n| **Caution:** Despite the name, you should only use the [`DEVICE_CREDENTIAL`](/reference/androidx/biometric/BiometricManager.Authenticators#DEVICE_CREDENTIAL) authenticator and not any of the biometric ones, as Android Automotive OS vehicles with Google built-in don't have biometric sensors."]]