סקירה כללית על פעילויות Trusted Web
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
פעילות Trusted Web היא דרך חדשה לפתוח את התוכן של אפליקציית האינטרנט שלכם, כמו אפליקציית ה-PWA שלכם, מאפליקציית Android שלכם באמצעות פרוטוקול שמבוסס על כרטיסיות בהתאמה אישית.
הערה: התכונה 'פעילות באתרים מהימנים' זמינה ב-Chrome ל-Android מגרסה 72 ואילך.
מחפשים את הקוד?
יש כמה הבדלים בין Trusted Web לבין דרכים אחרות לפתיחת תוכן אינטרנט מאפליקציית Android:
- התוכן בפעילות Trusted Web הוא מהימן – האפליקציה והאתר שהיא פותחת צפויים להגיע מאותו מפתח. (האימות מתבצע באמצעות Digital Asset Links).
- התוכן שעבר עיבוד בפעילות אינטרנט מהימנה מגיע מהאינטרנט: הוא עובר עיבוד על ידי הדפדפן של המשתמש, בדיוק באותו אופן שבו המשתמש היה רואה אותו בדפדפן, מלבד העובדה שהוא פועל במסך מלא. קודם כול, תוכן האינטרנט צריך להיות נגיש ושימושי בדפדפן.
- הדפדפנים מתעדכנים גם ללא קשר ל-Android ולאפליקציה שלכם. כך אפשר לחסוך בגודל ה-APK ולהבטיח שיהיה לכם אפשרות להשתמש בסביבת זמן ריצה מודרנית לאינטרנט. (לתשומת ליבכם: מאז Lollipop, WebView מתעדכן גם בנפרד מ-Android, אבל יש מספר משמעותי של משתמשי Android מלפני Lollipop).
- לאפליקציית המארח אין גישה ישירה לתוכן אינטרנט בפעילות מהימנה באינטרנט או לכל מצב אחר של אינטרנט, כמו קובצי cookie ו-
localStorage
. עם זאת, אפשר לתאם עם תוכן האינטרנט על ידי העברת נתונים מהדף אליו וממנו בכתובות URL (למשל, באמצעות פרמטרים של שאילתות ומזהי URI של כוונה).
- מעברים בין תוכן באינטרנט לבין תוכן מקומי מתרחשים בין פעילויות. כל פעילות (כלומר מסך) באפליקציה שלכם מסופקת באופן מלא על ידי האינטרנט או על ידי פעילות ב-Android
כדי שיהיה קל יותר לבדוק את התכונה, אין כרגע דרישות לתוכן שנפתח בתצוגה המקדימה של פעילויות באינטרנט מהימן. עם זאת, סביר להניח שפעילויות באינטרנט מהימן צריכות לעמוד באותן דרישות להוספה למסך הבית. אתם יכולים לבדוק אם האתר עומד בדרישות האלה באמצעות הבדיקה המשתמשים יכולים לקבל בקשה להוספה למסך הבית ב-Lighthouse.
היום, דפדפנים אחרים יכולים להטמיע את אותו פרוטוקול שבו נעשה שימוש בפעילויות באינטרנט מהימן. אפליקציית המארח היא זו שמחליטה איזה דפדפן ייפתח, אבל אנחנו ממליצים על אותה מדיניות כמו לגבי כרטיסיות בהתאמה אישית: להשתמש בדפדפן ברירת המחדל של המשתמש, כל עוד הדפדפן הזה מספק את היכולות הנדרשות.
לאן ממשיכים?
אם אתם רוצים ליצור במהירות אפליקציה ל-Android שפשוט פותחת את אפליקציית ה-PWA, כדאי לעיין במדריך למתחילים.
אם אתם רוצים לשלב את 'פעילות באינטרנט מהימנה' באפליקציה קיימת ל-Android, כדאי להתחיל במדריך השילוב.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","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 (שעון UTC)."],[],[],null,["# Overview of Trusted Web Activities\n\n**Trusted Web Activity** is a new way to open *your* web-app content such as *your* Progressive Web App (PWA) from *your* Android app using a protocol based on Custom Tabs.\n\n**Note** : Trusted Web Activity is available in [Chrome on Android](https://play.google.com/store/apps/details?id=com.android.chrome), version 72 and above.\n\n*Looking for the code?*\n\n- [android-browser-helper library on GitHub](https://github.com/GoogleChrome/android-browser-helper)\n- [Trusted Web Activity demos](https://github.com/GoogleChrome/android-browser-helper/tree/master/demos)\n- [Bubblewrap, a NodeJs library / CLI to generate and build Trusted Web Activity projects](https://github.com/GoogleChromeLabs/bubblewrap)\n\nThere are a few things that make Trusted Web Activity different from other ways to open web content from your Android app:\n\n1. Content in a Trusted Web activity is **trusted** -- the app and the site it opens are expected to come from the same developer. (This is verified using [Digital Asset Links](https://developers.google.com/digital-asset-links/v1/getting-started).)\n2. The content rendered in a Trusted Web Activity comes from the **web**: they're rendered by the user's browser, in exactly the same way as a user would see it in their browser except they are run fullscreen. Web content must be accessible and useful in the browser first.\n3. Browsers are also updated independent of Android and your app. That saves on APK size and ensures you can use a modern web runtime. (Note that since Lollipop, WebView has also been updated independent of Android, but there are a [significant number](/about/dashboards) of pre-Lollipop Android users.)\n4. The host app doesn't have direct access to web content in a Trusted Web Activity or any other kind of web state, like cookies and `localStorage`. Nevertheless, you can coordinate with the web content by passing data to and from the page in URLs (e.g. through query parameters and [intent URIs](https://developer.chrome.com/docs/multidevice/android/intents).)\n5. Transitions between web and native content are between **activities**. Each activity (i.e. screen) of your app is either completely provided by the web, or by an Android activity\n\nTo make it easier to test, there are currently no qualifications for content opened in the preview of Trusted Web activities. You can expect, however, that Trusted Web activities need to meet the same [Add to Home Screen](https://web.dev/customize-install#criteria) requirements. You can audit your site for these requirements using the [Lighthouse](https://web.dev/measure/) \"*user can be prompted to Add to Home screen*\" audit.\n\nToday, it is possible for other browsers to implement the same protocol that Trusted Web activities use. While the host app has the final say on what browser gets opened, we recommend the same policy as for Custom Tabs: use the user's default browser, so long as that browser provides the required capabilities.\n\nWhere to go next?\n-----------------\n\nIf you are looking for quickly building an Android app that just starts and opens your PWA, checkout out the [Quick Start Guide](https://developer.chrome.com/docs/android/trusted-web-activity/quick-start).\n\nIf integrating Trusted Web Activity into an existing Android App, the [Integration Guide](https://developer.chrome.com/docs/android/trusted-web-activity/integration-guide) is a good place to get started."]]