واجهة برمجة التطبيقات لمُحيل التثبيت في Play
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توفّر هذه المستندات مرجعًا فنيًا لاستخدام
Play Install Referrer API. واجهة برمجة التطبيقات Play Install Referrer API هي
واجهة خدمة AIDL
يستخدمها بشكل أساسي غير المبرمجين غير Java.
ملاحظة: توفّر مكتبة مُحيل التثبيت في Play برنامج تضمين حول واجهة برمجة تطبيقات مُحيل التثبيت في Play، وهي مصمَّمة لمساعدة مبرمجي Java على استخدام واجهة برمجة التطبيقات.
طريقة getInstallReferrer()
تعرض هذه الطريقة معلومات مُحيل تثبيت التطبيق المقابلة
لاسم الحزمة المحدد الذي تم إرساله من خلال Bundle
(تم تحديد المفتاح في الجدول 1). في الرد Bundle
المُرسَل من Google Play، يتم تخزين معلومات الإحالة في حقول تم ربطها بالمفاتيح المفصّلة في الجدول 2.
الجدول 1. طلب بيانات الحزمة getInstallReferrer()
.
المَعلمة
|
Type
|
الوصف
|
package_name
|
String
|
اسم حزمة المتصل، يُستخدم للتوضيح.
|
الجدول 2. بيانات الاستجابة من طلب getInstallReferrer()
.
المفتاح
|
Type
|
الوصف
|
install_referrer
|
String
|
عنوان URL المُحيل للحزمة المثبَّتة.
|
referrer_click_timestamp_seconds
|
long
|
الطابع الزمني من جهة العميل، بالثواني، عندما حدثت النقرة المُحيلة.
|
install_begin_timestamp_seconds
|
long
|
الطابع الزمني من جهة العميل، بالثواني، وقت بدء تثبيت التطبيق.
|
referrer_click_timestamp_server_seconds
|
long
|
الطابع الزمني من جهة الخادم، بالثواني، عندما حدثت النقرة المُحيلة.
|
install_begin_timestamp_server_seconds
|
long
|
الطابع الزمني من جهة الخادم، بالثواني، وقت بدء تثبيت التطبيق.
|
install_version
|
string
|
إصدار التطبيق في الوقت الذي تم فيه تثبيت التطبيق لأول مرة.
|
google_play_instant
|
boolean
|
يشير العمود إلى ما إذا كانت التجربة الفورية لتطبيقك قد بدأت خلال آخر 7 أيام.
|
تحذير: ستظل معلومات مُحيل التثبيت
متاحة لمدة 90 يومًا ولن تتغير ما لم تتم إعادة تثبيت التطبيق. لتجنُّب طلبات البيانات غير الضرورية من واجهة برمجة التطبيقات في تطبيقك، يجب استدعاء واجهة برمجة التطبيقات مرة واحدة فقط أثناء عملية التنفيذ الأولى بعد التثبيت.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Play Install Referrer API\n\nThis documentation provides technical reference for using the\nPlay Install Referrer API. The Play Install Referrer API is an\n[AIDL Service Interface](https://developer.android.com/guide/components/aidl.html)\nprimarily used by non-Java programmers.\n\n\n**Note:** The\n[Play Install Referrer Library](/google/play/installreferrer/library)\nprovides a wrapper around the Play Install Referrer API and is designed to help Java\nprogrammers use the API.\n\nThe getInstallReferrer() method\n-------------------------------\n\nThis method returns the app install referrer information corresponding to the\ngiven package name sent through a `Bundle` (key mapped in table 1). In the\nresponse `Bundle` sent by Google Play, the referral information is stored in\nfields mapped to the keys detailed in table 2.\n\n\n**Table 1.** `getInstallReferrer()` bundle data\nrequest.\n\n| Parameter | Type | Description |\n|----------------|----------|----------------------------------------------------------|\n| `package_name` | `String` | The package name of the caller, used for disambiguation. |\n\n\n**Table 2.** Response data from a `getInstallReferrer()`\nrequest.\n\n| Key | Type | Description |\n|-------------------------------------------|-----------|--------------------------------------------------------------------------------------|\n| `install_referrer` | `String` | The referrer URL of the installed package. |\n| `referrer_click_timestamp_seconds` | `long` | The client-side timestamp, in seconds, when the referrer click happened. |\n| `install_begin_timestamp_seconds` | `long` | The client-side timestamp, in seconds, when app installation began. |\n| `referrer_click_timestamp_server_seconds` | `long` | The server-side timestamp, in seconds, when the referrer click happened. |\n| `install_begin_timestamp_server_seconds` | `long` | The server-side timestamp, in seconds, when app installation began. |\n| `install_version` | `string` | The app's version at the time when the app was first installed. |\n| `google_play_instant` | `boolean` | Indicates whether your app's instant experience was launched within the past 7 days. |\n\n**Caution:** The install referrer information will be\navailable for 90 days and **won't change** unless the application is\nreinstalled. To avoid unnecessary API calls in your app, you should invoke the\nAPI **only once** during the first execution after install."]]