تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
من المفترض أن تعمل تطبيقات Wear OS بشكل مستقل عن الهاتف. ومع ذلك، إذا كان تطبيق Wear OS يعتمد على تطبيق جوّال، اطّلِع على المعلومات التالية حول ربط ساعة محاكية أو ساعة فعلية بهاتف.
إقران الأجهزة بمحاكي ساعة
يمكنك إقران الأجهزة بساعة Android Virtual Device (AVD) أو المحاكي يدويًا أو باستخدام أداة مساعدة لإقران المحاكي على Wear OS.
استخدام أداة مساعدة إقران محاكي Wear OS
ملاحظة: يجب أن يعمل هاتفك بنظام التشغيل Android 11 (المستوى 30 لواجهة برمجة التطبيقات) أو إصدار أحدث وأن يكون مثبّتًا عليه "متجر Google Play" لاستخدام أداة ربط المحاكي في Wear OS. تأكَّد أيضًا من أنّ محاكيات Wear تعمل بالمستوى 28 أو أعلى من واجهة برمجة التطبيقات لاستخدام أحدث ميزات "مساعد Google". لترقية صور النظام على الأجهزة المحاكية، استخدِم مدير SDK.
تسهّل أداة إقران محاكي Wear OS عملية إدارة محاكيات Wear وربطها. يمكنك إقران أجهزة Wear متعددة بهاتف واحد افتراضي أو حقيقي. يتذكّر "استوديو Android" أيضًا الأجهزة التي تم إقرانها سابقًا ويعيد إقرانها عند تشغيلها.
في إدارة الأجهزة، انقر على رمز قائمة الخيارات الإضافية
بجانب الجهاز الذي تريد إقرانه، ثم انقر على إقران جهاز قابل للارتداء.
الشكل 1. القائمة الكاملة لجهاز يمكن إقرانه بمحاكي Wear
سيؤدي ذلك إلى تشغيل أداة مساعدة لإقران محاكي Wear OS. إذا اخترت إقران جهاز قابل للارتداء في إدخال خاص بهاتف، ستظهر لك قائمة بأجهزة Wear المتوفّرة. إذا بدأت باستخدام جهاز Wear، ستظهر لك قائمة بالهواتف المتاحة. اختَر الجهاز الذي تريد إقرانه وانقر على التالي.
قد يستغرق تشغيل Android Studio وإعداد الأجهزة بضع دقائق. إذا لم يكن تطبيق Wear OS للأجهزة الجوّالة مثبَّتًا على هاتفك، اتّبِع التعليمات لتسجيل الدخول إلى "متجر Play" وتثبيت التطبيق وإعداده.
لإقران الأجهزة في تطبيق Wear OS على هاتفك، انقر على قائمة الخيارات الإضافية
واختَر الإقران بالمحاكي.
بعد إقران الأجهزة بنجاح، يعرض مدير الأجهزة رموزًا صغيرة بجانب الأجهزة المقترنة. يمكنك أيضًا النقر على القائمة المنسدلة للخيارات الإضافية
واختيار عرض التفاصيل للاطّلاع على قائمة بالأجهزة المقترنة.
الشكل 2. تعرض نافذة أداة الأجهزة المقترنة الأجهزة المقترنة بالجهاز المحدّد.
إقران هاتف بجهاز AVD للساعة
إذا كنت تريد استخدام حساب Google على محاكي Android الافتراضي للساعة لأغراض التطوير، يمكنك إقران هاتف بمحاكي Android الافتراضي للساعة ومزامنة حساب Google باتّباع الخطوات التالية:
على الهاتف، فعِّل خيارات المطوّرين وتصحيح أخطاء الجهاز عبر USB.
وصِّل الهاتف بالكمبيوتر من خلال USB.
أعِد توجيه منفذ الاتصال الخاص بجهاز Android الافتراضي إلى الهاتف المتصل في كل مرة يتم فيها توصيل الهاتف باستخدام هذا الأمر: adb -d forward tcp:5601 tcp:5601
في تطبيق Wear OS المصاحب على الهاتف، ابدأ عملية الإقران العادية. على سبيل المثال، انقر على الزر إعداد في شاشة الترحيب.
بدلاً من ذلك، إذا كانت هناك ساعة مقترنة من قبل، انقر على إضافة ساعة جديدة في القائمة أعلى يمين الشاشة.
في تطبيق Wear OS المصاحب على الهاتف، انقر على قائمة الخيارات الإضافية، ثم انقر على الإقران بالمحاكي.
انقر على رمز الإعدادات.
ضمن إعدادات الجهاز، انقر على المحاكي.
انقر على الحسابات واختَر حسابًا على Google. اتّبِع الخطوات الواردة في المعالج لمزامنة الحساب مع المحاكي. إذا لزم الأمر، أدخِل كلمة مرور قفل الشاشة وكلمة مرور حساب Google لبدء مزامنة الحساب.
ربط هاتف بأجهزة Wear متعددة
لربط جهاز Wear ثانٍ بهاتف افتراضي أو حقيقي، اتّبِع الخطوات نفسها التي تتّبعها عند إجراء عملية الإقران الأولية: ابحث عن الهاتف أو جهاز Wear الذي تريد إقرانه في إدارة الأجهزة، وانقر على رمز قائمة الخيارات الإضافية، ثم انقر على إقران جهاز قابل للارتداء.
إعداد هاتف
يحتوي هذا القسم على معلومات حول كيفية إعداد هاتف جوّال باستخدام تطبيق Wear OS مصاحِب.
استخدام إصدار Android من التطبيق المصاحب
على هاتف Android، انتقِل إلى بطاقة بيانات تطبيق
ساعة Wear OS الذكية من Google. انقر على تحديث لتنزيل التطبيق وتثبيته. بعد التثبيت، تأكَّد من تحديد خيار التحديث التلقائي للتطبيق. يمكنك الاطّلاع على قسم "كيفية تحديث تطبيقات Android كلٍّ على حدة تلقائيًا" في مقالة تحديث التطبيقات التي تم تنزيلها. انقر على فتح لبدء تشغيل التطبيق.
إقران هاتف Android بساعة
بعد تثبيت التطبيق المصاحب على هاتف، عليك إلغاء ربط أي ساعات قديمة، إذا لزم الأمر. بعد ذلك، أقرِن الهاتف بساعة تمّت إعادة ضبطها. لإجراء ذلك، أكمل الخطوات التالية:
على الهاتف، اختَر اسم جهاز الساعة من قائمة الأجهزة. يظهر رمز إقران على الهاتف والساعة. تأكَّد من تطابق الرموز.
انقر على إقران لمواصلة عملية الإقران. عندما تتصل الساعة بالهاتف، ستظهر رسالة تأكيد. على الهاتف، ستظهر شاشة تعرض قائمة بالحسابات على الهاتف.
اختَر حساب Google لإضافته ومزامنته مع ساعتك.
أكِّد قفل الشاشة وأدخِل كلمة المرور لبدء نسخ الحساب من الهاتف إلى الساعة.
اتّبِع التعليمات الواردة في المعالج لإنهاء عملية الإقران.
تطبيق مصاحب لأجهزة iPhone
يتوفّر تطبيق مصاحب لنظام التشغيل iOS على الهواتف التي تعمل بالإصدار 8.2 أو الإصدارات الأحدث.
لتثبيته، اتّبِع الخطوات التالية:
على هاتف iPhone، انتقِل إلى App Store ونزِّل تطبيق Wear OS من Google وثبِّته.
اتّبِع التعليمات التي تظهر على الساعة والهاتف لبدء عملية الإقران. للحصول على معلومات إضافية، يمكنك الاطّلاع على الصفحة حول
حلّ مشاكل الإعداد في ساعتك.
إعادة استخدام الرمز لتطبيق على الأجهزة الجوّالة في وحدة Wear OS
يمكنك إضافة وحدة لجهاز Wear OS
إلى مشروعك الحالي في "استوديو Android" لإعادة استخدام الرمز من
تطبيقك على الأجهزة الجوّالة.
إنشاء وحدة Wear OS في مشروعك الحالي
لإنشاء وحدة Wear OS، افتح مشروع "استوديو Android" الحالي واتّبِع الخطوات التالية:
انقر على ملف > جديد > وحدة جديدة.
في نافذة وحدة جديدة، اختَر وحدة Wear OS وانقر على التالي.
ضِمن ضبط الوحدة الجديدة، أدخِل ما يلي:
اسم التطبيق/المكتبة: عنوان رمز مشغّل التطبيقات للوحدة النمطية الجديدة
اسم الوحدة: اسم المجلد الذي يحتوي على رمز المصدر وملفات الموارد
اسم الحزمة: مساحة الاسم الخاصة بالرمز
في الوحدة. تتم إضافة السلسلة كسمة
package
في
ملف بيان Android الخاص بالوحدة.
الحد الأدنى لإصدار SDK: هو أدنى إصدار من النظام الأساسي يتوافق معه
وحدة تطبيق. على سبيل المثال، اختَر API 26: Android 8.0.
تضبط هذه القيمة السمة minSdkVersion في ملف build.gradle،
ويمكنك تعديلها لاحقًا.
انقر على التالي. تظهر لك خيارات متعددة لنموذج الرمز. اختَر
نشاط Wear OS فارغ، ثم انقر على التالي.
في نافذة ضبط النشاط، أدخِل القيم التلقائية أو اقبلها
لكلّ من اسم النشاط واسم التصميم واللغة المصدر. انقر على إنهاء.
ينشئ Android Studio الملفات ويُجري مزامنتها للوحدة النمطية الجديدة.
يضيف "استوديو Android" أيضًا أي تبعيات مطلوبة لنظام التشغيل Wear OS إلى ملف الإصدار الخاص بالوحدة النمطية الجديدة. يظهر النموذج الجديد في نافذة المشروع على الجانب الأيسر من الشاشة.
إذا لم يظهر لك مجلد الوحدة النمطية الجديدة، تأكَّد من أنّ النافذة تعرض
طريقة عرض Android.
أدرِج ما يلي في ملف build.gradle لوحدة Wear OS الجديدة:
في قسم android، اضبط القيم على 33 بالنسبة إلى compileSdkVersion و30 بالنسبة إلى targetSdkVersion.
أضِف التبعيات التي تحتاج إليها. لمزيد من المعلومات، راجِع تعريف التبعيات.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Connect a watch to a phone\n\nWear OS apps should work independently of a phone. However, if your Wear OS app\ndepends on a mobile app, see the following information about connecting either\nan emulated watch or a physical watch to a phone.\n\nPair devices with a watch emulator\n----------------------------------\n\nYou can pair devices to your watch Android Virtual Device (AVD), or emulator, manually or by\nusing the Wear OS emulator pairing assistant.\n\n### Use the Wear OS emulator pairing assistant\n\n\n**Note:** Your phone must run Android 11 (API level 30) or\nhigher and have the Google Play Store installed to use the Wear OS\nemulator pairing assistant. Also, make sure your Wear emulators run API\nlevel 28 or higher to use the latest assistant features. To upgrade system\nimages for your emulated devices, use the\n[SDK Manager](/studio/intro/update#sdk-manager).\n\n\nThe Wear OS emulator pairing assistant makes it easier to manage and\nconnect Wear emulators. You can pair multiple Wear devices with a single\nvirtual or physical phone. Android Studio also remembers and re-pairs\npreviously paired devices when they're launched.\n\n\nTo pair two devices, follow these steps:\n\n1. If you haven't already, [create a Wear emulator](/training/wearables/get-started/creating#emulator).\n2. In the **Device Manager** , click the overflow menu icon\n next to a device you want to pair and select **Pair Wearable**.\n\n\n **Figure 1.** Overflow menu of a device that can be paired with a Wear emulator.\n\n \u003cbr /\u003e\n\n3. This launches the Wear OS emulator pairing assistant. If you selected **Pair Wearable** on the entry for a phone, you see a list of available Wear devices. If you started with a Wear device, you see a list of available phones. Select the device you want to pair and click **Next**.\n4. It might take a few minutes for Android Studio to launch and prepare the devices. If your phone doesn't have the Wear OS companion app installed, follow the prompts to log in to the Play Store, install it, and set it up.\n5. To pair your devices in the Wear OS app on your phone, click the overflow menu and select **Pair with emulator**.\n\n\nAfter your devices are successfully paired, the **Device Manager** shows small\nicons next to the paired devices. You can also click the overflow drop-down menu\nand select **View Details** to see a list of paired devices.\n**Figure 2.** The **Paired Devices** tool window shows devices paired with the selected device.\n\n### Pair a phone with the watch AVD\n\n\nIf you want a Google Account on the watch AVD for development,\nyou can pair a phone with the watch AVD and sync a Google Account by doing\nthe following:\n\n1. Follow the steps to [set up a phone](#setting-up-a-phone).\n2. On the phone, enable **Developer Options** and **USB\n Debugging**.\n3. Connect the phone to your computer through USB.\n4. Forward the AVD's communication port to the connected phone each time the phone is connected using this command: \n `adb -d forward tcp:5601 tcp:5601`\n5. In the Wear OS companion app on the phone, begin the standard pairing process. For example, on the Welcome screen, tap the **Set It Up** button. Alternatively, if an existing watch already is paired, tap **Add a New Watch** in the upper-left menu.\n6. In the Wear OS companion app on the phone, tap the overflow menu, and then tap **Pair with Emulator**.\n7. Tap the **Settings** icon.\n8. Under **Device Settings** , tap **Emulator**.\n9. Tap **Accounts** and select a Google Account. Follow the steps in the wizard to sync the account with the emulator. If necessary, type the screen-lock device password and Google Account password to start the account sync.\n\n### Connect a phone to multiple Wear devices\n\n\nTo connect a second Wear device to a virtual or physical phone, follow the same\nsteps you would for an initial pairing: locate the phone or Wear device you want\nto pair in the **Device Manager** , click the overflow menu icon, and\nclick **Pair Wearable**.\n\n\u003cbr /\u003e\n\nSet up a phone\n--------------\n\n\u003cbr /\u003e\n\n\nThis section contains information about setting up a mobile phone\nwith a Wear OS companion app.\n\n### Use the Android version of the companion app\n\n\nOn an Android phone, go to the [Wear OS by Google Smartwatch](https://play.google.com/store/apps/details?id=com.google.android.wearable.app) app listing. Tap **Update** to download and\ninstall the app. After installation, confirm that\n**Auto-update** is selected for the app. See\nthe \"How to update individual Android apps automatically\" section of [Update downloaded\napps](https://support.google.com/googleplay/answer/113412). Tap **Open** to start the app.\n\n#### Pair an Android phone to a watch\n\n\nAfter you install the companion app on a phone, unpair any obsolete watch pairings, if\nnecessary. Then pair the phone to a newly imaged watch. To do this, complete the following steps:\n\n1. On the phone, select your watch device name from the list of devices. A pairing code displays on the phone and on the watch. Check that the codes match.\n2. Tap **Pair** to continue the pairing process. When the watch connects to the phone, a confirmation message displays. On the phone, a screen displays that lists the accounts on the phone.\n3. Choose a Google account to add and sync to your watch.\n4. Confirm the screen lock and enter the password to start copying the account from the phone to the watch.\n5. Follow the instructions in the wizard to finish the pairing process.\n\n#### Companion app for iPhones\n\n\nAn iOS companion app is available for phones running iOS 8.2 or higher.\nTo install it, do the following:\n\n1. On your iPhone, visit the App Store and download and install the [Wear OS by Google](https://itunes.apple.com/us/app/android-wear/id986496028) companion app.\n2. Follow the instructions on the watch and on the phone to begin the pairing process. For additional information, see the page about [fixing setup issues with your watch](https://support.google.com/androidwear/answer/6057772?co=GENIE.Platform%3DiOS&oco=0).\n\nReuse code for a mobile app in a Wear OS module\n-----------------------------------------------\n\n\nYou can [add a module](/studio/projects/add-app-module) for a Wear OS device\nto your existing project in Android Studio to let you reuse code from your\nmobile app.\n\n### Create a Wear OS module in your existing project\n\n\nTo create a Wear OS module, open your existing Android Studio project and do the following:\n\n1. Click **File** \\\u003e **New** \\\u003e **New Module**.\n2. In the **New Module** window, select **Wear OS Module** and click **Next**.\n3. Under **Configure the new module** , enter the following:\n - **Application/Library Name**: the title of your app launcher icon for the new module\n - **Module Name**: the name of the folder for your source code and resource files\n - **Package Name** : the namespace for the code in your module. The string is added as the [`package`](/guide/topics/manifest/manifest-element#package) attribute in the module's [Android manifest file](/guide/topics/manifest/manifest-intro).\n - **Minimum SDK** : the lowest version of the platform that the app module supports. For example, select **API 26: Android 8.0** . This value sets the `minSdkVersion` attribute in the `build.gradle` file, which you can edit later.\n4. Click **Next** . You see multiple code template options. Select **Blank Wear OS Activity** and then click **Next**.\n5. In the **Configure Activity** window, enter or accept the default values for the **Activity Name** , **Layout Name** , and **Source Language** . Click **Finish**.\n\nAndroid Studio creates and syncs the files for the new module.\nAndroid Studio also adds any required dependencies for Wear OS\nto the new module's build file. The new module appears in\nthe **Project** window on the left side of the screen.\nIf you don't see the new module's folder, make sure the window is displaying the\n[Android view](/studio/projects#ProjectFiles).\n\nInclude the following in the `build.gradle` file for the new Wear OS module:\n\n- In the `android` section, set the values for `compileSdkVersion` to 33 and `targetSdkVersion` to 30.\n- Add the dependencies you need. For more information, see [Declaring dependencies](/jetpack/androidx/releases/wear#declaring_dependencies).\n- [Sync](/studio/build#sync-files) your Android Studio project. To run the code in the new module, see [Launch the\n emulator and run your Wear OS app](/training/wearables/get-started/creating#run-emulator)."]]