از 27 مارس 2025، توصیه می کنیم از android-latest-release به جای aosp-main برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در Android 12 یا بالاتر، سازندگان دستگاه میتوانند به صورت اختیاری یک تجربه اتصال ساده را اتخاذ کنند که به کاربران کمک میکند اتصالات شبکه خود را بهتر درک کنند، بین ارائهدهندگان اینترنت جابهجا شوند و مشکلات اتصال شبکه را عیبیابی کنند. این تغییرات در تجربه کاربر در مقایسه با اندروید 11 یا پایینتر، در رابط کاربری، نمادنگاری و تغییرات API برای تنظیمات و تنظیمات سریع منعکس میشود. همه این تغییرات در AOSP برای سازندگان دستگاه در دسترس هستند تا آنها را فعال کنند یا سفارشی کنند.
مروری بر تجربه اتصال ساده شده
این بخش تغییرات عمده رابط کاربری تجربه اتصال ساده شده در AOSP را که از اندروید 12 شروع می شود، توضیح می دهد.
کاشی اینترنت در تنظیمات سریع
منوی تنظیمات سریع شامل یک کاشی اینترنتی است که یک پانل اینترنت را باز می کند که در آن کاربران می توانند بین Wi-Fi و اتصالات تلفن همراه جابجا شوند. کاشی اینترنت ترکیبی از کاشیهای Wi-Fi و داده موبایلی است که در Android 11 یا پایینتر استفاده میشوند.
شکل 1. کاشی اینترنت در تنظیمات سریع
بخش تماس و پیامک در تنظیمات
برنامه تنظیمات شامل بخش تماس و پیامک در زیر شبکه و اینترنت است که وضعیت در دسترس بودن و گزینههای تماس Wi-Fi را نشان میدهد.
شکل 2. بخش تماس و پیامک در تنظیمات
دکمه ریست در تنظیمات
در برنامه تنظیمات، شبکه و اینترنت > اینترنت شامل یک دکمه بازنشانی است که به کاربران امکان میدهد مودمهای تلفن و Wi-Fi دستگاه را بازنشانی کنند، که ممکن است هنگام عیبیابی مشکلات اتصال شبکه مفید باشد.
شکل 3. دکمه تنظیم مجدد برای عیب یابی مشکلات اتصال
پیاده سازی
برای فعال کردن تجربه اتصال ساده در دستگاه خود، از پرچم تنظیمات جهانی زیر استفاده کنید:
مقدار: برای فعال کردن رفتار سادهسازی اتصال، روی true ، برای غیرفعال کردن آن و استفاده از رفتار قدیمی، false را تنظیم کنید. با شروع اندروید 12، مسیر رمز برای false دیگر به طور فعال حفظ نمی شود.
علاوه بر این، میتوانید حالتهای رابط کاربری زیر را برای اپراتورهای جداگانه با استفاده از پیکربندی حامل پیکربندی کنید. کلیدهای پیکربندی عبارتند از:
CarrierConfigManager#KEY_CARRIER_PROVISIONS_WIFI_MERGED_NETWORKS_BOOL : یک بولی که نشان می دهد شرکت مخابراتی شبکه های Wi-Fi را که بخشی از شبکه اصلی آن هستند و به عنوان بخشی از شبکه تلفن همراه نمایش داده می شوند پیکربندی می کند یا خیر. این کار با روش WifiNetworkSuggestion.Builder#setCarrierMerged(booleanisCarrierMerged) کار می کند.
CarrierConfigManager#KEY_USE_IP_FOR_CALLING_INDICATOR_BOOL : یک بولی که نشان می دهد آیا اتصال شبکه داده (IP) به عنوان یک شرط تکمیلی برای نمایش دروازه نماد عدم تماس استفاده می شود یا خیر.
CarrierConfigManager#KEY_DISPLAY_CALL_STRENGTH_INDICATOR_BOOL : یک بولی که نشان می دهد آیا نماد قدرت تماس در رابط کاربری سیستم نمایش داده می شود یا خیر.
APIهای چارچوب
برای غیرفعال کردن موقت شبکههای Wi-Fi اطراف، از APIهای زیر استفاده کنید:
WifiManager#startRestrictingAutoJoinToSubscriptionId(int subscriptionId) : به کاربر این امکان را می دهد تا بدون غیرفعال کردن Wi-Fi یک شبکه حامل را انتخاب کند. تمام شبکههای Wi-Fi قابل مشاهده را برای حداقل مدت زمان 30 دقیقه (که از طریق پوشش config_wifiAllNonCarrierMergedWifiMinDisableDurationMinutes کنترل میشود)، و حداکثر مدت زمان 6 ساعت (که از طریق config_wifiAllNonCarrierMergedWifiMaxDisableDurationMinutes کنترل میشود) غیرفعال میکند. شبکههای Wi-Fi هر زمان که Wi-Fi خاموش شود، مجدداً فعال میشوند، دستگاه راهاندازی مجدد میشود، اگر کاربر یک شبکه Wi-Fi را انتخاب کند (در این صورت API stopRestrictingAutoJoinToSubscriptionId() توسط Settings اجرا میشود)، یا اگر شبکه به مدت 60 دقیقه قابل مشاهده نباشد.
WifiManager#stopRestrictingAutoJoinToSubscriptionId() : عملکرد عادی را بازیابی می کند.
برای پشتیبانی از دکمه تنظیم مجدد و رابط کاربری عیب یابی که در کلاس com.android.settingslib.connectivity.ConnectivitySubsystemsRecoveryManager پیاده سازی شده است، از API های زیر استفاده کنید:
WifiManager#restartWifiSubsystem(String reason) : زیرسیستم Wi-Fi را مجددا راه اندازی می کند.
TelephonyManager#rebootRadio() : مودم رادیویی را بازنشانی می کند.
با چندین حامل کار کنید
اگر تجربه اتصال سادهشده را برای شرکتهای مخابراتی خاص و نه برخی دیگر اتخاذ میکنید، از سناریوی چند سیمکارت آگاه باشید، که در آن کاربر از دو سیمکارت استفاده میکند، یکی از شریک شرکت مخابراتی که تغییر رابط کاربری را انتخاب کرده است در حالی که دیگری این کار را نکرده است. در این سناریو، مطمئن شوید که تصمیم میگیرید که کاربران کدام UI را ببینند و رفتار را در دستگاههای خود بهطور کامل آزمایش کنید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Connectivity user interface\n\nIn Android 12 or higher, device manufacturers can\noptionally adopt a simplified connectivity experience that helps users better\nunderstand their network connections, switch between internet providers, and\ntroubleshoot network connectivity issues. These changes in user experience as\ncompared to Android 11 or lower, are reflected in user interface,\niconography, and API changes for Quick Settings and Settings. All of these\nchanges are available in AOSP for device manufacturers to enable as is or to\ncustomize.\n| **Note:** We recommend that device manufacturers and carriers adopt these changes to promote a unified Android ecosystem and a consistent experience for users.\n\nSimplified connectivity experience overview\n-------------------------------------------\n\nThis section describes the major user interface changes of the simplified\nconnectivity experience in AOSP starting in Android 12.\n\n### Internet tile in Quick Settings\n\nThe Quick Settings menu includes an Internet tile that opens up an Internet\npanel where users can switch between Wi-Fi and cellular connections. The\nInternet tile combines the Wi-Fi and Mobile Data tiles used in Android 11 or\nlower.\n\n**Figure 1.** Internet tile in Quick Settings\n\n### Calls \\& SMS section in Settings\n\nThe Settings app includes a **Calls \\& SMS** section under **Network \\&\nInternet** that displays availability status and Wi-Fi calling options.\n\n**Figure 2.** Calls \\& SMS section in Settings\n\n### Reset button in Settings\n\nIn the Settings app, **Network \\& Internet \\\u003e Internet** includes a\n**reset button** that lets users reset the telephony and Wi-Fi modems on the\ndevice, which may be useful when troubleshooting network connectivity issues.\n\n**Figure 3.** Reset button for troubleshooting connectivity issues\n\nImplementation\n--------------\n\nTo enable the simplified connectivity experience on your device, use the\nfollowing global settings flag:\n\n- Name: `persist.sys.fflag.override.settings_provider_model`\n- Type: Boolean\n- Value: Set to `true` to enable the connectivity simplification behavior, `false` to disable it and use the legacy behavior. Starting in Android 12, the codepath for `false` is no longer actively maintained.\n\nAdditionally, you can configure the following modes of the user interface for\nindividual carriers using\n[carrier configuration](/docs/core/connect/carrier).\nThe configuration keys are:\n\n- `CarrierConfigManager#KEY_CARRIER_PROVISIONS_WIFI_MERGED_NETWORKS_BOOL`: A boolean indicating whether the carrier configures Wi-Fi networks that are part of its core network and are displayed as part of the mobile network. This works in tandem with the `WifiNetworkSuggestion.Builder#setCarrierMerged(booleanisCarrierMerged)` method.\n- `CarrierConfigManager#KEY_USE_IP_FOR_CALLING_INDICATOR_BOOL`: A boolean indicating whether data network (IP) connectivity is used as a supplemental condition to gate display of the *no calling* icon.\n- `CarrierConfigManager#KEY_DISPLAY_CALL_STRENGTH_INDICATOR_BOOL`: A boolean indicating whether the *call strength* icon is displayed in the system UI.\n\n### Framework APIs\n\n| **Note:** If you are selectively implementing certain elements of the simplified connectivity UI, make sure to thoroughly test that all the elements are working together properly.\n\nTo temporarily disable nearby Wi-Fi networks, use\nthe following APIs:\n\n- `WifiManager#startRestrictingAutoJoinToSubscriptionId(int\n subscriptionId)`: Allows the user to select a carrier network without disabling Wi-Fi. Disables all visible Wi-Fi networks for a minimum duration of 30 minutes (controlled through the `config_wifiAllNonCarrierMergedWifiMinDisableDurationMinutes` overlay), and a maximum duration of 6 hours (controlled through the `config_wifiAllNonCarrierMergedWifiMaxDisableDurationMinutes` overlay). Wi-Fi networks are reenabled whenever Wi-Fi is toggled, the device is rebooted, if the user selects a Wi-Fi network (in which case the `stopRestrictingAutoJoinToSubscriptionId()` API is executed by Settings), or if the network isn't visible for 60 minutes.\n- `WifiManager#stopRestrictingAutoJoinToSubscriptionId()`: Restores normal operation.\n\nTo support the reset button and troubleshooting user interface, which is\nimplemented in the\n`com.android.settingslib.connectivity.ConnectivitySubsystemsRecoveryManager`\nclass, use the following APIs:\n\n- `WifiManager#restartWifiSubsystem(String reason)`: Restarts the Wi-Fi subsystem.\n- `TelephonyManager#rebootRadio()`: Resets radio modem.\n\nWork with multiple carriers\n---------------------------\n\nIf you adopt the simplified connectivity experience for certain carriers but not\nothers, be aware of the multi-SIM scenario, where a user uses two SIMs, one from\na carrier partner that has opted for the UI changes while the other hasn't. In\nthis scenario, make sure to decide which UI the users see and to thoroughly test\nthe behavior on your devices."]]