التفاعل مع التطبيقات الأخرى
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يشتمل تطبيق Android عادةً على العديد من الأنشطة. يعرض كل نشاط واجهة مستخدم تتيح للمستخدم أداء مهمة محددة، مثل عرض خريطة أو التقاط صورة.
لنقل المستخدم من نشاط إلى آخر، يجب أن يستخدم تطبيقك Intent
لتحديد "هدف" تطبيقك لتنفيذ إجراء ما. عند تمرير
Intent
إلى النظام من خلال طريقة
مثل startActivity()
،
يستخدم النظام Intent
لتحديد مكوِّن التطبيق المناسب وبدء تشغيله. يتيح استخدام الأهداف لتطبيقك
بدء نشاط موجود في تطبيق منفصل.
يمكن أن يكون عنصر Intent
صريحًا لبدء مثيل Activity
معيّن أو ضمنيًا لبدء أي مكوّن يمكنه التعامل مع الإجراء المقصود، مثل "التقاط صورة".
توضّح لك المواضيع الواردة في هذا الدليل كيفية استخدام Intent
لإجراء بعض التفاعلات الأساسية
مع التطبيقات الأخرى، مثل بدء تشغيل تطبيق آخر وتلقّي نتيجة من هذا التطبيق
والسماح لتطبيقك بالاستجابة لأهداف التطبيقات الأخرى.
المواضيع
- إرسال المستخدم إلى تطبيق آخر
- توضّح لك كيفية إنشاء أهداف ضمنية لتشغيل تطبيقات أخرى يمكنها تنفيذ إجراء.
- الحصول على نتيجة من نشاط
- يعرض لك كيفية بدء نشاط آخر والحصول على نتيجة من النشاط.
- السماح للتطبيقات الأخرى ببدء نشاطك
- يوضح لك كيفية جعل الأنشطة في تطبيقك مفتوحة للاستخدام بواسطة التطبيقات الأخرى من خلال تحديد فلاتر النية التي توضح الأهداف الضمنية التي يقبلها تطبيقك.
- فلترة مستوى ظهور الحزمة على أجهزة Android
- يعرض لك هذا الإعداد كيفية جعل التطبيقات الأخرى مرئية لتطبيقك إذا لم تكن مرئية بشكل تلقائي. ينطبق ذلك فقط على التطبيقات التي تستهدف الإصدار 11 من Android (المستوى 30 لواجهة برمجة التطبيقات) أو الإصدارات الأحدث.
- تلبية حالات الاستخدام الشائعة
مع الوصول إلى الحزمة بشكلٍ محدود
- يعرض هذا التقرير أنواعًا متعددة من التفاعلات مع التطبيقات التي قد تتطلب منك تعديل
ملف البيان الخاص بتطبيقك لكي تكون التطبيقات الأخرى مرئية لتطبيقك.
لا ينطبق إلا على التطبيقات التي تستهدف الإصدار 11 من نظام التشغيل Android (المستوى 30 من واجهة برمجة التطبيقات) أو الإصدارات الأحدث.
- تقييد التحميل في حاويات Android على الجهاز
- توضّح لك هذه المقالة كيفية تقييد تحميل تطبيق "متجر Play" في تطبيق محاكاة لبيئة Android، يُعرَف أيضًا باسم حاوية Android على الجهاز.
للحصول على معلومات إضافية حول المواضيع الواردة في هذه الصفحة، يُرجى الاطّلاع على ما يلي:
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-02-10 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-02-10 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Interact with other apps\n\nAn Android app typically has several [activities](/guide/components/activities). Each activity displays a\nuser interface that lets the user perform a specific task, such as viewing a map or taking a photo.\nTo take the user from one activity to another, your app must use an [Intent](/reference/android/content/Intent) to define your app's \"intent\" to do something. When you pass an\n`Intent` to the system with a method\nsuch as [startActivity()](/reference/android/app/Activity#startActivity(android.content.Intent)),\nthe system uses the `Intent` to identify and start the appropriate app component. Using intents\neven lets your app start an activity that is contained in a separate app.\n\nAn `Intent` can be *explicit* , to start\na specific [Activity](/reference/android/app/Activity) instance,\nor *implicit*, to start any\ncomponent that can handle the intended action, such as \"capture a photo.\"\n\nThe topics in this guide show you how to use an `Intent` to perform some basic\ninteractions with other apps, such as starting another app, receiving a result from that app, and\nmaking your app able to respond to intents from other apps.\n\nTopics\n------\n\n**[Sending the user to another app](/training/basics/intents/sending)**\n: Shows you how to create implicit intents to launch other apps that can perform an\n action.\n\n**[Get a result from an activity](/training/basics/intents/result)**\n: Shows you how to start another activity and receive a result from the activity.\n\n**[Allow other apps to start your activity](/training/basics/intents/filters)**\n: Shows you how to make activities in your app open for use by other apps by defining\n intent filters that declare the implicit intents your app accepts.\n\n**[Package visibility filtering on Android](/training/basics/intents/package-visibility)**\n: Shows you how to make other apps visible to your app if they\n aren't visible by default. Applies only to apps that target Android 11\n (API level 30) or higher.\n\n**[Fulfill common use cases while\nhaving limited package visibility](/training/basics/intents/package-visibility-use-cases)**\n: Shows several types of app interactions that might require you to update\n your app's manifest file so that other apps are visible to your app.\n Applies only to apps that target Android 11 (API level 30) or higher.\n\n**[Limit loading in on-device Android containers](/training/basics/intents/limit-play-loading)**\n: Shows you how to limit your Play Store app from loading in a simulated\n Android environment app, also known as an on-device Android container.\n\nFor additional information about the topics on this page, see the following:\n\n- [Sharing simple data](/training/sharing)\n- [Sharing files](/training/secure-file-sharing)\n- [Integrating Application with Intents](http://android-developers.blogspot.com/2009/11/integrating-application-with-intents.html) blog post\n- [Intents and Intent\n Filters](/guide/components/intents-filters)"]]