تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
اضبط ملفات بيان تطبيقك لتتكامل مع Android Auto وAndroid Automotive OS (AAOS). لتفعيل إمكانية العثور على خدمة متصفّح الوسائط والاتصال بها من خلال هذه الأنظمة الأساسية، يجب تعريف خدمة متصفّح الوسائط في البيان. حدِّد رموز التطبيقات المطلوبة، بما في ذلك رمز مشغّل التطبيقات ورمز تحديد المصدر الذي تستخدمه مكوّنات واجهة مستخدم النظام، مثل عناصر التحكّم في الوسائط.
يتصل كل من Android Auto وAndroid Automotive OS بتطبيقك من خلال خدمة متصفّح الوسائط لتصفّح عناصر الوسائط. عليك الإفصاح عن خدمة متصفّح الوسائط في ملف البيان الخاص بك للسماح لنظامَي Android Auto وAndroid Automotive OS باكتشاف الخدمة والاتصال بتطبيقك.
يوضّح مقتطف الرمز البرمجي هذا كيفية تعريف خدمة متصفّح الوسائط في ملف البيان. أدرِج هذا الرمز في ملف البيان الخاص بوحدة AAOS وفي ملف البيان الخاص بتطبيق الهاتف.
يمثّل رمز مشغّل التطبيقات تطبيقك في واجهة مستخدم النظام، مثل مشغّل التطبيقات ولوحة الرموز. يمكنك تحديد أنّك تريد استخدام الرمز من تطبيقك على الأجهزة الجوّالة لتمثيل تطبيق وسائط السيارة باستخدام بيان التطبيق التالي:
يُستخدم رمز تحديد المصدر في الأماكن التي يكون فيها محتوى الوسائط له الأولوية، مثل بطاقات الوسائط. ننصحك بإعادة استخدام الرمز الصغير المستخدَم للإشعارات.
يجب أن يكون هذا الرمز أحادي اللون.
الشكل 1. رمز الإحالة على بطاقة الوسائط
يمكنك تحديد رمز يُستخدَم لتمثيل تطبيقك باستخدام بيان
البيانات التالي:
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Configure manifest files\n\nConfigure your app's manifest files to integrate with Android Auto and Android\nAutomotive OS (AAOS). To enable discovery and connection by these platforms,\ndeclare your media browser service in the manifest. Specify the required app\nicons, including a launcher icon for an attribution\nicon for use by system UI components such as media controls.\n\nTo learn more about manifest files, see [App manifest overview](/guide/topics/manifest/manifest-intro).\n\nDeclare your media browser service\n----------------------------------\n\nAndroid Auto and AAOS connect to your app through your media browser service to\nbrowse media items. Declare your media browser service in your manifest to let\nAndroid Auto and AAOS discover the service and connect to your app.\n\nThis code snippet shows how to declare your media browser service in your\nmanifest. The next section of this guide, [Create a media browser service](/training/cars/media/create-media-browser),\ndetails the process of implementing the service. \n\n \u003capplication\u003e\n ...\n \u003cservice android:name=\".MyMediaBrowserService\"\n android:exported=\"true\"\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.media.browse.MediaBrowserService\"/\u003e\n \u003c/intent-filter\u003e\n \u003c/service\u003e\n ...\n \u003c/application\u003e\n\n| **Caution:** You might see a lint warning because the service is exported, but doesn't set the [`android:permission`](/guide/topics/manifest/service-element#prmsn) attribute. It's generally safe to ignore this warning because you can [Add package validation](/training/cars/media/create-media-browser/content-hierarchy#package-validation), which provides more control over which host apps can connect to your app.\n\nSpecify app icons\n-----------------\n\nTo represent your app in the system UI, specify the app icons that Android Auto\nand AAOS should use. These two icons are required:\n\n- [Define the launcher icon](#launcher-icon)\n- [Define the attribution icon](#attribution-icon)\n\n| **Design guidelines:** [Branding elements](/design/ui/cars/guides/app-cuj/branding-elements).\n\n### Define the launcher icon\n\nThe launcher icon represents your app in the system UI, such as on the launcher\nand in the tray of icons.\n\nBy default, the [`android:icon`](/guide/topics/manifest/application-element#icon) attribute of your app's\n[`\u003capplication\u003e`](/guide/topics/manifest/application-element) element is used as the launcher icon: \n\n \u003capplication\n ...\n android:icon=\"@mipmap/ic_launcher\"\n \u003e\n\nTo use a different icon, set the `android:icon` attribute of your media browser\nservice's [`\u003cservice\u003e`](/guide/topics/manifest/service-element) element: \n\n \u003capplication\u003e\n ...\n \u003cservice\n ...\n android:icon=\"@mipmap/ic_car_launcher\"/\u003e\n \u003c/application\u003e\n\n### Define the attribution icon\n\nThe attribution icon is used in places where media content takes precedence,\nsuch as on media cards. Consider reusing the small icon used for notifications.\nThis icon must be monochrome.\n\n**Figure 1.** Attribution icon on media card.\n\nYou can specify an icon that is used to represent your app using this manifest\ndeclaration: \n\n \u003capplication\u003e\n ...\n \u003cmeta-data\n android:name=\"androidx.car.app.TintableAttributionIcon\"\n android:resource=\"@drawable/ic_status_icon\" /\u003e\n ...\n \u003c/application\u003e\n\nSpecify your app's label\n------------------------\n\nBy default, the value of the [`android:label`](/guide/topics/manifest/application-element#label) attribute of your app's\n`\u003capplication\u003e` element is used as the display name for your app on the car\nscreen.\n\nTo use a different display name -- or if your app has multiple media browser\nservices -- set the `android:label` attribute of the media browser service's\n`\u003cservice\u003e` element.\n\nSpecify your app's accent color\n-------------------------------\n\nYour app's accent color is used by Android Auto and AAOS to style playback\ncontrols and other UI elements.\n\nBy default, the accent color is pulled from the [`colorAccent`](/reference/android/R.attr#colorAccent) item of the\n[`android:theme`](/guide/topics/manifest/application-element#theme) style resource of your app's `\u003capplication\u003e` element.\n\nTo use a different accent color for your in-car experience, include a\n[`\u003cmeta-data\u003e`](/guide/topics/manifest/meta-data-element) element for a different style resource containing a\n`colorAccent` item: \n\n \u003capplication\u003e\n ...\n \u003cmeta-data\n android:name=\"com.google.android.gms.car.application.theme\"\n android:resource=\"@style/\u003cvar translate=\"no\"\u003eTHEME_NAME\u003c/var\u003e\"/\u003e\n ...\n \u003c/application\u003e\n\nPlatform-specific configuration\n-------------------------------\n\nIn addition to the configuration detailed on this page, see the following\nsections for platform-specific requirements:\n\n- [Add support for Android Auto to your media app](/training/cars/media/auto#manifest-car-app)\n- [Add support for Android Automotive OS to your media app](/training/cars/media/automotive-os#automotive-module)"]]