הכנת הסביבה ורישום משתמשים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ל-Android Management API (AMAPI) SDK יש תפקיד חשוב בתהליך ההרשמה החדש של בקר מדיניות מכשירים (DPC) בהתאמה אישית. הוא מאפשר תקשורת בין אפליקציות DPC מותאמות אישית של EMM לבין Android Device Policy (ADP), ומייעל את רישום המכשירים באמצעות אינטראקציה עם Play EMM API לצורך רישום פונקציות מפתח.
הפונקציות העיקריות של AMAPI SDK:
- מאפשרת תקשורת בין אפליקציות DPC של EMM לבין Android Device Policy.
- מאפשרת ביצוע מקומי של פקודות.
- תמיכה בתהליך החדש של רישום מכשירים להוספת חשבונות Google מנוהלים.
- מנהל את ההתקנה או העדכונים של Android Device Policy כשצריך.
ה-SDK חיוני לשני תהליכים עיקריים בתהליך ההרשמה של DPC בהתאמה אישית:
הוא מגדיר את הסביבה על ידי עזרה בהתקנה ובעדכון של Android Device
Policy במכשיר בצורה נכונה.
היא משמשת להתקשרות מקומית עם Android Device Policy, שמתחילה את רצף הכניסה של המשתמש במכשיר.
הפונקציות הבסיסיות האלה מכינות את המכשיר לניהול ומאפשרות את השלבים הבאים בתהליך ההרשמה.
סביבה
EnvironmentClient
של AMAPI SDK הוא ממשק שמאפשר גישה לממשקי API שקשורים לסביבה. אפשר ליצור מופע באמצעות EnvironmentClientFactory
.
התכונות העיקריות של EnvironmentClient
:
- מוודאים שרמת ה-API של ה-SDK עומדת בדרישה המינימלית.
- בודק אם צריך לעדכן את שירותי Google Play ומתחיל את העדכון אם צריך.
- מאמתת שאפליקציית Device Policy ל-Android מותקנת ומעודכנת. חשוב לזכור שתהליך הזה יכול לקחת זמן כי הוא עשוי לכלול התקנה או עדכון.
למידע נוסף על הממשק EnvironmentClient
, אפשר לעיין במסמכי העזרה.
AccountSetup
הסיווג AccountSetup
ב-AMAPI SDK אחראי לניהול התהליך של הגדרת חשבון Google במכשיר Android מנוהל.
התכונות העיקריות של AccountSetup:
- מתחילים את תהליך הגדרת החשבון באמצעות
AccountSetupClient
ואסימון הרשמה.
- הוא מטפל בטוקן הרישום, שנוצר על ידי ה-EMM ומועבר אל
AMAPI SDK. הטוקן הזה קובע אם נדרש אימות משתמש.
- מפעיל פעילות אימות אם צריך, ומבקש מהמשתמש להיכנס באמצעות פרטי הכניסה שלו לחשבון Google.
- מקבל קריאה חוזרת (callback) עם כתובת האימייל ומזהה המשתמש אחרי כניסה מוצלחת.
- מערכת ה-EMM משתמשת במזהי המשתמשים שהתקבלו כדי להגדיר את מדיניות המכשיר באמצעות השיטה
Devices.update
.
- ה-EMM מתקשר אל
Devices.setState
כדי לסמן את המכשיר כעומד בדרישות ולאפשר גישה לשירותי Google.
הפונקציונליות הזו היא חלק משיטה חדשה לרישום מכשירים שמבוססת על AMAPI SDK במקום על ספריית התמיכה של DPC. פרטים נוספים על AccountSetup
זמינים במסמכי העזר של AMAPI
ובמדריך הטמעה של חשבונות משתמשים.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-25 (שעון UTC)."],[],[],null,["# Environment preparation and user enrollment\n\nThe Android Management API (AMAPI) SDK plays a important role in the new custom\nDevice Policy Controller (DPC) enrollment flow. It facilitates communication\nbetween EMM custom DPC apps and Android Device Policy (ADP) and streamlines\ndevice enrollment by interacting with the Play EMM API for key enrollment\nfunctions.\n\nKey functions of the AMAPI SDK:\n-------------------------------\n\n- Enables communication between EMM DPC apps and Android Device Policy.\n- Facilitates local execution of commands.\n- Supports the new device enrollment flow for adding managed Google Accounts.\n- Manages the installation or updates of Android Device Policy when needed.\n\nThe SDK is essential for two primary reasons in the custom DPC enrollment flow:\n\n1. It sets the environment by helping to install and update Android Device\n Policy correctly on the device.\n\n2. It is used to call Android Device Policy locally, which initiates the user\n login sequence on the device.\n\nThese foundational functions prepare the device for management and make the\nsubsequent enrollment steps possible.\n\n*** ** * ** ***\n\nEnvironment\n-----------\n\nThe AMAPI SDK's `EnvironmentClient` is an interface that allows access to\nenvironment-related APIs. You can create an instance using\n`EnvironmentClientFactory`.\n\n### Key features of the `EnvironmentClient`:\n\n- Makes sure the SDK API level meets the minimum requirement.\n- Checks for and initiates an update for Google Play services if needed.\n- Verifies that Android Device Policy is installed and updated. Be aware that this process can take some time as it may involve an installation or update.\n\nFor more details on the `EnvironmentClient` interface, see the [reference\ndocumentation](/android/management/reference/amapi/com/google/android/managementapi/environment/EnvironmentClient).\n\n*** ** * ** ***\n\nAccountSetup\n------------\n\nThe `AccountSetup` class within the AMAPI SDK is responsible for managing the\nprocess of setting up a Google Account on a managed Android device.\n\n### Key features of the AccountSetup:\n\n- Starts the account setup process using the `AccountSetupClient` and an enrollment token.\n- Handles the enrollment token, which is generated by the EMM and passed to the AMAPI SDK. This token determines whether user authentication is required.\n- Launches an authentication activity if needed, prompting the user to sign in with their Google credentials.\n- Receives a callback with the user's email and user ID upon successful sign-in.\n- The EMM uses the received user identifiers to set the device policy with the [`Devices.update`](/android/work/play/emm-api/v1/devices/update) method.\n- The EMM calls [`Devices.setState`](/android/work/play/emm-api/v1/devices/setState) to mark the device as compliant and allow access to Google services.\n\nThis functionality is part of a new device enrollment method that leverages the\nAMAPI SDK instead of the DPC support library. For more details on `AccountSetup`\nsee [AMAPI reference\ndocumentation](/android/management/reference/amapi/com/google/android/managementapi/accountsetup/package-summary)\nand [Implement the user accounts\nguide](/android/work/play/emm-api/implement-user-accounts)."]]