اختبار تطبيقك باستخدام ميزة "الوصول المباشر إلى جهاز Android"
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح لك ميزة "بث تطبيقات Android على الأجهزة" التفاعل مع تطبيقاتك واختبارها على مستويات متعددة من واجهات برمجة التطبيقات وأشكال الأجهزة المختلفة في مراكز بيانات Google الآمنة ضِمن Android Studio. باستخدام ميزة "بث التطبيقات على الأجهزة"، يمكنك التفاعل مع تطبيقك على جهاز حقيقي، تمامًا كما يفعل المستخدم، بما في ذلك تدوير الجهاز وطيّه. يتيح لك ذلك معرفة سلوك تطبيقك في حالات مختلفة وتحديد أي مشاكل قد لا تظهر في بيئات الاختبار الأخرى.
بدء استخدام ميزة "بث المحتوى من جهاز Android"
إذا لم يسبق لك إجراء ذلك، نزِّل أحدث إصدار ثابت من استوديو Android وثبِّته، ثم اتّبِع الخطوات التالية:
في Android Studio، افتح مشروع Android وانتقِل إلى نافذة أداة مدير الأجهزة وانقر على رمز Firebase.
إذا لم يسبق لك تسجيل الدخول إلى حساب المطوِّر، انقر على تسجيل الدخول إلى Google واتّبِع التعليمات.
بعد منح "استوديو Android" الأذونات المطلوبة، ارجع إلى بيئة التطوير المتكاملة (IDE) واختَر مشروعًا على Firebase. إذا لم يكن لديك مشروع على Firebase، يمكنك إنشاء مشروع بدون أي تكلفة في وحدة تحكّم Firebase.
ملاحظة: لتفعيل الأذونات المناسبة لاستخدام ميزة "بث المحتوى من الجهاز" مع مشروعك على Firebase، راجِع أذونات Test Lab.
بعد اختيار مشروع، يمكنك تصفُّح قائمة الأجهزة واختيار الأجهزة التي تريد استخدامها.
لاستخدام ميزة "البث المباشر على الأجهزة"، يجب استخدام مشروع على Firebase لديك إذن محرِّر أو مالك فيه. إذا أردت منح فريقك أدوارًا وأذونات أكثر تحديدًا، يمكنك تفعيل أذونات "مركز الاختبار الافتراضي" لميزة "بث الأجهزة".
أذونات "مركز الاختبار الافتراضي"
لضبط أذونات "المختبر" كي تتمكّن من تنفيذ اختبارك وقراءة نتائجه، عليك ضبط إذن الوصول إلى حِزم Cloud Storage. يمكنك منح إذن الوصول إلى "مركز الاختبار الافتراضي" باستخدام وحدة تحكّم Firebase أو gcloud CLI.
لكي يتمكّن المستخدم من إجراء اختبارات أو عرض نتائج الاختبارات من خلال gcloud CLI أثناء استخدام حزمة Cloud Storage الخاصة بك، يمكنك إسناد مجموعة من الأدوار المحدّدة مسبقًا، والتي ستمنح مجموعة الأذونات المطلوبة معًا، باستخدام وحدة تحكّم Google Cloud.
تاريخ التعديل الأخير: 2025-09-06 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-06 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["\u003cbr /\u003e\n\nAndroid Device Streaming lets you interact with and test your apps across\nmultiple API levels and form factors in Google's secure data centers within\nAndroid Studio. With device streaming, you can interact with your app on a real\ndevice, just like a user would, including rotating and folding the device. This\nlets you see how your app behaves in different situations and to identify\nany problems that might not be apparent in other testing environments.\n\nGet started with Android Device Streaming\n\nIf you haven't done so already, download and install the latest Stable build\nof [Android Studio](https://developer.android.com/studio/) and\nfollow these steps:\n\n1. In Android Studio, open an Android project and navigate to the **Device\n Manager** tool window and click the Firebase icon.\n2. If you're not already signed in to your developer account, click **Log in to\n Google** and follow the prompts.\n3. After providing Android Studio with the requested permissions, return to the IDE and select a Firebase project. If you don't have a Firebase project, you can create one at no cost in the [Firebase console](https://console.firebase.google.com/). Note: To enable the proper permissions to use device streaming with your Firebase project, see [Test Lab permissions](#enable-testlab-permissions).\n4. After selecting a project, you can browse the list of devices and select the devices you want to use.\n5. Click **OK**.\n\nFor more information on how to get started with device streaming, see [Device Streaming in Android Studio](https://developer.android.com/studio/run/android-device-streaming).\n\nEnable permissions for Android Device Streaming\n\nTo use Device Streaming, you need to use a Firebase project that you have either\n**Editor** or **Owner** permissions. If you want to provide more specific roles\nand permissions to your team, you can enable [Test Lab\npermissions](#enable-testlab-permissions) for Device Streaming.\n\nTest Lab permissions\n\nTo configure Test Lab permissions so that you can execute and read your test\nresults, you have to configure access to Cloud Storage buckets. You can grant\naccess to Test Lab, using the Firebase console or gcloud CLI.\n\nFor a user to run tests or view test results from the Firebase console or the\n[Test Lab Device Matrix in Android Studio](https://developer.android.com/studio/test/test-in-android-studio#run-with-firebase-test-lab),\nyou will need to assign them the Editor and Viewer project roles.\n\nFor a user to run tests or view test results from the gcloud CLI while using\nyour own Cloud Storage bucket, you can assign a pair of predefined roles, that\nwill grant the required set of permissions together, using the Google Cloud\nconsole.\n\n- To run test, assign the Firebase Test Lab Admin and Firebase Analytics Viewer roles.\n- To view test results, assign the Firebase Test Lab Viewer and Firebase Analytics Viewer roles.\n\nFor more information on how to configure these granular Test Lab permissions,\nsee Test Lab's [IAM permissions reference guide](/docs/test-lab/android/iam-permissions-reference)."]]