इस गाइड से एंटरप्राइज़ मोबिलिटी मैनेजमेंट (ईएमएम) कंपनियों को, अपनी कंसोल में बिना छुए रजिस्ट्रेशन की सुविधा को इंटिग्रेट करने में मदद मिलती है. रजिस्ट्रेशन के बारे में ज़्यादा जानने के लिए पढ़ना जारी रखें. साथ ही, डिवाइसों को उपलब्ध कराने में अपने डीपीसी (डिवाइस नीति कंट्रोलर) की मदद करने के लिए, सबसे सही तरीका अपनाएं. अगर आपके पास डीपीसी है, तो आपको डिवाइसों को प्रोविज़न करने के सबसे सही तरीकों के बारे में जानकारी मिलेगी. साथ ही, डेवलपमेंट और टेस्टिंग में मदद पाने के लिए सलाह मिलेगी.
आईटी एडमिन के लिए सुविधाएं
ग्राहक एपीआई का इस्तेमाल करें, ताकि आईटी एडमिन आपकी कंसोल से सीधे तौर पर ज़ीरो-टच रजिस्ट्रेशन की सुविधा सेट अप कर सकें. यहां कुछ ऐसे टास्क दिए गए हैं जिन्हें आईटी एडमिन, आपकी कंसोल में पूरा कर सकता है:
- मोबाइल डिवाइस की नीतियों के आधार पर, ज़ीरो-टच एनरोलमेंट कॉन्फ़िगरेशन बनाना, उनमें बदलाव करना, और उन्हें मिटाना.
- डिफ़ॉल्ट कॉन्फ़िगरेशन सेट करें, ताकि आपका DPC, संगठन के खरीदे गए आने वाले डिवाइसों को उपलब्ध करा सके.
- डिवाइसों पर अलग-अलग कॉन्फ़िगरेशन लागू करें या डिवाइसों को ज़ीरो-टच रजिस्ट्रेशन से हटाएं.
पहले से तैयार डिवाइस के बारे में ज़्यादा जानने के लिए, खास जानकारी पढ़ें.
ज़रूरी शर्तें
अपनी EMM कंसोल में zero-touch enrollment जोड़ने से पहले, पक्का करें कि आपका समाधान इन सुविधाओं के साथ काम करता हो:
- आपके ईएमएम सलूशन को, कंपनी के मालिकाना हक वाले Android 8.0 या इसके बाद के वर्शन (Pixel 7.1 या इसके बाद का वर्शन) वाले डिवाइस को पूरी तरह से मैनेज किए जाने वाले मोड में उपलब्ध कराना होगा. कंपनी के मालिकाना हक वाले Android 10 या इसके बाद के वर्शन वाले डिवाइसों को पूरी तरह से मैनेज किए जाने वाले डिवाइस या वर्क प्रोफ़ाइल के साथ प्रोविज़न किया जा सकता है.
- ज़िरो-टच एनरोलमेंट की सुविधा, DPC को अपने-आप डाउनलोड और इंस्टॉल करती है. इसलिए, आपका DPC Google Play पर उपलब्ध होना चाहिए. हम ऐसे DPC की सूची बनाए रखते हैं जो Android Enterprise के साथ काम करते हैं. आईटी एडमिन, ग्राहक एपीआई या पोर्टल का इस्तेमाल करके इन्हें कॉन्फ़िगर कर सकते हैं. सूची में अपना डीपीसी जोड़ने के लिए, EMM सेवा देने वाली कंपनी की कम्यूनिटी के ज़रिए, प्रॉडक्ट में बदलाव करने का अनुरोध सबमिट करें.
- आपके ग्राहकों को Customer API को कॉल करने के लिए, पहले से तैयार डिवाइस के लिए एक खाते की ज़रूरत होती है. जब कोई संगठन अपने डिवाइस खरीदता है, तब पार्टनर रीसेलर, आईटी एडमिन के संगठन के लिए खाता सेट अप करता है.
- डिवाइस, Google Mobile Services (GMS) के साथ काम करता हो. साथ ही, बिना छुए रजिस्ट्रेशन की सुविधा के सही तरीके से काम करने के लिए, Google Play की सेवाएं हमेशा चालू रहनी चाहिए.
एपीआई को कॉल करना
आपकी कंसोल के उपयोगकर्ता (अपने Google खाते का इस्तेमाल करके), ग्राहक एपीआई के लिए आपके एपीआई अनुरोधों को अनुमति देते हैं. यह फ़्लो, अन्य ईएमएम एपीआई के लिए किए जाने वाले अनुमति देने के फ़्लो से अलग है. अपने ऐप्लिकेशन में ऐसा करने का तरीका जानने के लिए, अनुमति लेख पढ़ें.
सेवा की शर्तों को मैनेज करना
आपके उपयोगकर्ताओं को एपीआई कॉल करने से पहले, सेवा की नई शर्तें स्वीकार करनी होंगी. अगर एपीआई कॉल से एचटीटीपी 403 Forbidden स्टेटस कोड मिलता है और जवाब के मुख्य हिस्से में TosError शामिल है, तो उपयोगकर्ता को शून्य-टच रजिस्ट्रेशन पोर्टल में साइन इन करके, सेवा की शर्तों को स्वीकार करने के लिए कहें. नीचे दिए गए उदाहरण में, ऐसा करने का एक तरीका बताया गया है:
Java
// Authorize this method call as a user that hasn't yet accepted the ToS. final String googleApiFormatHttpHeader = "X-GOOG-API-FORMAT-VERSION"; final String googleApiFormatVersion = "2"; final String tosErrorType = "type.googleapis.com/google.android.device.provisioning.v1.TosError"; try { // Send an API request to list all the DPCs available including the HTTP header // X-GOOG-API-FORMAT-VERSION with the value 2. Import the exception: // from googleapiclient.errors import HttpError AndroidProvisioningPartner.Customers.Dpcs.List request = service.customers().dpcs().list(customerAccount); request.getRequestHeaders().put(googleApiFormatHttpHeader, googleApiFormatVersion); CustomerListDpcsResponse response = request.execute(); return response.getDpcs(); } catch (GoogleJsonResponseException e) { // Get the error details. In your app, check details exists first. ArrayList<Map> details = (ArrayList<Map>) e.getDetails().get("details"); for (Map detail : details) { if (detail.get("@type").equals(tosErrorType) && (boolean) detail.get("latestTosAccepted") != true) { // Ask the user to accept the ToS. If they agree, open the portal in a browser. // ... } } return null; }
.NET
// Authorize this method call as a user that hasn't yet accepted the ToS. try { var request = service.Customers.Dpcs.List(customerAccount); CustomerListDpcsResponse response = request.Execute(); return response.Dpcs; } catch (GoogleApiException e) { foreach (SingleError error in e.Error?.Errors) { if (error.Message.StartsWith("The user must agree the terms of service")) { // Ask the user to accept the ToS. If they agree, open the portal in a browser. // ... } } }
Python
# Authorize this method call as a user that hasn't yet accepted the ToS. tos_error_type = ('type.googleapis.com/' 'google.android.device.provisioning.v1.TosError') portal_url = 'https://enterprise.google.com/android/zero-touch/customers' # Send an API request to list all the DPCs available including the HTTP # header X-GOOG-API-FORMAT-VERSION with the value 2. Import the exception: # from googleapiclient.errors import HttpError try: request = service.customers().dpcs().list(parent=customer_account) request.headers['X-GOOG-API-FORMAT-VERSION'] = '2' response = request.execute() return response['dpcs'] except HttpError as err: # Parse the JSON content of the error. In your app, check ToS exists first. error = json.loads(err.content) tos_error = error['error']['details'][0] # Ask the user to accept the ToS (not shown here). If they agree, then open # the portal in a browser. if (tos_error['@type'] == tos_error_type and tos_error['latestTosAccepted'] is not True): if raw_input('Accept the ToS in the zero-touch portal? y|n ') == 'y': webbrowser.open(portal_url)
अगर आपका Google API क्लाइंट, गड़बड़ियों के बारे में ज़्यादा जानकारी देता है (Java, Python या एचटीटीपी अनुरोध), तो अपने अनुरोधों में एचटीटीपी हेडर X-GOOG-API-FORMAT-VERSION को 2 वैल्यू के साथ शामिल करें. अगर आपका क्लाइंट गड़बड़ियों के बारे में ज़्यादा जानकारी नहीं देता है (.NET और अन्य), तो गड़बड़ी के मैसेज को मैच करें.
अगर आने वाले समय में हम सेवा की शर्तों को अपडेट करते हैं, तो इस तरीके का इस्तेमाल करने पर आपका ऐप्लिकेशन, उपयोगकर्ता को नई सेवा की शर्तों को फिर से स्वीकार करने के लिए रीडायरेक्ट करता है.
पोर्टल का लिंक
आईटी एडमिन, ज़ीरो-टच एनरोलमेंट पोर्टल का इस्तेमाल करके अपने संगठन के उपयोगकर्ताओं को मैनेज करते हैं. हालांकि, Customer API के ज़रिए यह सुविधा उपलब्ध नहीं कराई जा सकती. आईटी एडमिन, पोर्टल का इस्तेमाल करके डिवाइसों और कॉन्फ़िगरेशन को भी मैनेज कर सकते हैं. अगर आपको अपने कंसोल या दस्तावेज़ में पोर्टल का लिंक जोड़ना है, तो इस यूआरएल का इस्तेमाल करें:
https://enterprise.google.com/android/zero-touch/customers
आईटी एडमिन को यह जानकारी दी जा सकती है कि उन्हें अपने Google खाते से साइन इन करने के लिए कहा जाएगा.
डिवाइस रजिस्टर करें
Zero-touch enrollment, डिवाइसों को रजिस्टर करने का एक तरीका है. यह एनएफ़सी या क्यूआर कोड से रजिस्टर करने की सुविधा की तरह है. आपकी कंसोल में मैनेज किए गए डिवाइसों के साथ काम करने की सुविधा होनी चाहिए. साथ ही, आपके डीपीसी को पूरी तरह से मैनेज किए गए डिवाइस मोड में काम करना चाहिए.
पहले से तैयार डिवाइस की सुविधा, Android 8.0 या उसके बाद के वर्शन पर काम करने वाले डिवाइसों पर उपलब्ध है. आईटी एडमिन को पार्टनर रीसेलर से, काम करने वाले डिवाइस खरीदने होंगे. आपकी कंसोल यह ट्रैक कर सकती है कि आईटी एडमिन के कौनसे डिवाइस, 'पहले से तैयार डिवाइस' की सुविधा के लिए उपलब्ध हैं. इसके लिए, customers.devices.list को कॉल करें.
यहां बताया गया है कि रजिस्टर करने की प्रोसेस कैसे काम करती है:
- डिवाइस को पहली बार चालू करने पर या फ़ैक्ट्री रीसेट करने के बाद, ज़ीरो-टच रजिस्ट्रेशन के लिए Google सर्वर से संपर्क किया जाता है.
- अगर आईटी एडमिन ने डिवाइस पर कोई कॉन्फ़िगरेशन लागू किया है, तो ज़ीरो-टच एनरोलमेंट, पूरी तरह से मैनेज किए जा रहे डिवाइस पर Android सेटअप विज़र्ड चलाता है. साथ ही, कॉन्फ़िगरेशन के मेटाडेटा के हिसाब से स्क्रीन को पसंद के मुताबिक बनाता है.
- ज़ीरो-टच रजिस्ट्रेशन की सुविधा, Google Play से आपके DPC को डाउनलोड और इंस्टॉल करती है.
- आपका DPC,
ACTION_PROVISION_MANAGED_DEVICEइंटेंट को स्वीकार करता है और डिवाइस को प्रोविज़न करता है.
अगर इंटरनेट कनेक्शन नहीं है, तो कनेक्शन उपलब्ध होने पर जांच की जाती है. पहले से तैयार डिवाइस की मदद से डिवाइस प्रोविज़निंग के बारे में ज़्यादा जानने के लिए, यहां प्रोविज़निंग देखें.
डिफ़ॉल्ट कॉन्फ़िगरेशन
ज़ीरो-टच रजिस्ट्रेशन की सुविधा, आईटी एडमिन के लिए तब सबसे ज़्यादा फ़ायदेमंद होती है, जब वे डिफ़ॉल्ट कॉन्फ़िगरेशन सेट करते हैं. यह कॉन्फ़िगरेशन, उनके संगठन के खरीदे गए सभी नए डिवाइसों पर लागू होता है. अगर कोई डिफ़ॉल्ट कॉन्फ़िगरेशन सेट नहीं है, तो अपनी कंसोल से डिफ़ॉल्ट कॉन्फ़िगरेशन सेट करने का सुझाव दें. customers.configurations.isDefault की वैल्यू देखकर, यह पता लगाया जा सकता है कि किसी संगठन ने डिफ़ॉल्ट कॉन्फ़िगरेशन सेट किया है या नहीं.
नीचे दिए गए उदाहरण में, किसी मौजूदा कॉन्फ़िगरेशन को डिफ़ॉल्ट बनाने का तरीका बताया गया है:
Java
// Send minimal data with the request. Just the 2 required fields. // targetConfiguration is an existing configuration that we want to make the default. Configuration configuration = new Configuration(); configuration.setIsDefault(true); configuration.setConfigurationId(targetConfiguration.getConfigurationId()); // Call the API, including the FieldMask to avoid setting other fields to null. AndroidProvisioningPartner.Customers.Configurations.Patch request = service .customers() .configurations() .patch(targetConfiguration.getName(), configuration); request.setUpdateMask("isDefault"); Configuration results = request.execute();
.NET
// Send minimal data with the request. Just the 2 required fields. // targetConfiguration is an existing configuration that we want to make the default. Configuration configuration = new Configuration { IsDefault = true, ConfigurationId = targetConfiguration.ConfigurationId, }; // Call the API, including the FieldMask to avoid setting other fields to null. var request = service.Customers.Configurations.Patch(configuration, targetConfiguration.Name); request.UpdateMask = "IsDefault"; Configuration results = request.Execute();
Python
# Send minimal data with the request. Just the 2 required fields. # target_configuration is an existing configuration we'll make the default. configuration = { 'isDefault': True, 'configurationId': target_configuration['configurationId']} # Call the API, including the FieldMask to avoid setting other fields to null. response = service.customers().configurations().patch( name=target_configuration['name'], body=configuration, updateMask='isDefault').execute()
आपके DPC का रेफ़रंस देना
हमारा सुझाव है कि अपने डीपीसी की पहचान करने और उसे कॉन्फ़िगरेशन में इस्तेमाल करने के लिए, एपीआई रिसॉर्स के नाम customers.dpcs.name का इस्तेमाल करें. संसाधन के नाम में, DPC के लिए एक यूनीक और न बदलने वाला आइडेंटिफ़ायर होता है. इस्तेमाल किए जा सकने वाले सभी डीपीसी की सूची पाने के लिए, customers.dpcs.list को कॉल करें. संसाधन के नाम में ग्राहक आईडी भी शामिल होता है. इसलिए, मिलती-जुलती Dpc इंस्टेंस ढूंढने के लिए, पाथ के आखिरी कॉम्पोनेंट का इस्तेमाल करके सूची को फ़िल्टर करें. नीचे दिए गए उदाहरण में बताया गया है कि अपने DPC को कैसे मैच करें और उसे बाद में कॉन्फ़िगरेशन में इस्तेमाल करने के लिए कैसे सेव करें:
Java
// Return a customer Dpc instance for the specified DPC ID. String myDpcIdentifier = "AH6Gbe4aiS459wlz58L30cqbbXbUa_JR9...xMSWCiYiuHRWeBbu86Yjq"; final int dpcIdIndex = 3; final String dpcComponentSeparator = "/"; // ... for (Dpc dpcApp : dpcs) { // Because the DPC name is in the format customers/{CUST_ID}/dpcs/{DPC_ID}, check the // fourth component matches the DPC ID. String dpcId = dpcApp.getName().split(dpcComponentSeparator)[dpcIdIndex]; if (dpcId.equals(myDpcIdentifier)) { System.out.format("My DPC is: %s\n", dpcApp.getDpcName()); return dpcApp; } } // Handle the case when the DPC isn't found...
.NET
// Return a customer Dpc instance for the specified DPC ID. var myDpcIdentifer = "AH6Gbe4aiS459wlz58L30cqbbXbUa_JR9...fE9WdHcxMSWCiYiuHRWeBbu86Yjq"; const int dpcIdIndex = 3; const String dpcComponentSeparator = "/"; // ... foreach (Dpc dpcApp in dpcs) { // Because the DPC name is in the format customers/{CUST_ID}/dpcs/{DPC_ID}, check the // fourth component matches the DPC ID. String dpcId = dpcApp.Name.Split(dpcComponentSeparator)[dpcIdIndex]; if (dpcId.Equals(myDpcIdentifer)) { Console.WriteLine("Matched DPC is: {0}", dpcApp.DpcName); return dpcApp; } } // Handle the case when the DPC isn't found...
Python
# Return a customer Dpc instance for the specified DPC ID. my_dpc_id = 'AH6Gbe4aiS459wlz58L30cqb...fE9WdHcxMSWCiYiuHRWeBbu86Yjq' # ... for dpc_app in dpcs: # Because the DPC name is in the format customers/{CUST_ID}/dpcs/{DPC_ID}, # check the fourth component matches the DPC ID. dpc_id = dpc_app['name'].split('/')[3] if dpc_id == my_dpc_id: return dpc_app # Handle the case when the DPC isn't found...
अगर आपको अपनी कंसोल के उपयोगकर्ता इंटरफ़ेस में किसी डीपीसी का नाम दिखाना है, तो customers.dpcs.dpcName से मिली वैल्यू दिखाएं.
प्रावधान
डिवाइस प्रोविज़निंग के लिए, उपयोगकर्ताओं को बेहतरीन अनुभव देने का मौका पाएं.
डिवाइस को चालू करने के लिए, सिर्फ़ उपयोगकर्ता नाम और पासवर्ड की ज़रूरत होती है.
ध्यान रखें कि रीसेलर, डिवाइसों को सीधे तौर पर रिमोट उपयोगकर्ताओं को शिप कर सकते हैं. customers.configuration.dpcExtras में, ईएमएम सर्वर या संगठन की इकाई जैसी अन्य सभी सेटिंग शामिल करें.
नीचे दिए गए JSON स्निपेट में, कॉन्फ़िगरेशन के उदाहरण का कुछ हिस्सा दिखाया गया है:
{
"android.app.extra.PROVISIONING_LOCALE": "en_GB",
"android.app.extra.PROVISIONING_TIME_ZONE": "Europe/London",
"android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED": true,
"android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE": {
"workflow_type": 3,
"default_password_quality": 327680,
"default_min_password_length": 6,
"company_name": "XYZ Corp",
"organizational_unit": "sales-uk",
"management_server": "emm.example.com",
"detail_tos_url": "https://www.example.com/policies/terms/",
"allowed_user_domains": "[\"example.com\", \"example.org\", \"example.net\"]"
}
}
ज़ीरो-टच रजिस्ट्रेशन की सुविधा, Android Intent का इस्तेमाल करके आपके DPC को इंस्टॉल और लॉन्च करती है.
सिस्टम, android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE JSON प्रॉपर्टी में मौजूद वैल्यू को आपके DPC को इंटेंट में अतिरिक्त जानकारी के तौर पर भेजता है. आपका DPC, एक ही कुंजियों का इस्तेमाल करके PersistableBundle से प्रोविज़निंग सेटिंग पढ़ सकता है.
सुझाया गया—अपने DPC को सेट अप करने के लिए, यहां दिए गए इंटेंट एक्स्ट्रा का इस्तेमाल करें:
EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLEEXTRA_PROVISIONING_LOCALEEXTRA_PROVISIONING_TIME_ZONEEXTRA_PROVISIONING_LOCAL_TIMEEXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLEDEXTRA_PROVISIONING_MAIN_COLOREXTRA_PROVISIONING_DISCLAIMERS
सुझाया नहीं गया है—इन अतिरिक्त फ़ायदों को शामिल न करें. इनका इस्तेमाल, एनरोलमेंट के अन्य तरीकों में किया जा सकता है:
EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAMEEXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUMEXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADEREXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATIONEXTRA_PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM
अपने DPC में इन सेटिंग को एक्सट्रैक्ट और इस्तेमाल करने का तरीका जानने के लिए, ग्राहक के डिवाइसों को प्रोविज़न करना लेख पढ़ें.
डेवलपमेंट और टेस्टिंग
अपनी कंसोल की ज़ीरो-टच रजिस्ट्रेशन की सुविधाओं को डेवलप और टेस्ट करने के लिए, आपको इनकी ज़रूरत होगी:
- इस सुविधा के साथ काम करने वाला डिवाइस
- ग्राहक का ज़ीरो-टच रजिस्ट्रेशन की सुविधा वाला खाता
ऐसे डिवाइसों पर डेवलप और टेस्ट करें जिनमें ज़ीरो-टच एनरोलमेंट की सुविधा काम करती है. जैसे, Google Pixel. आपको अपने डेवलपमेंट डिवाइस, रीसेलर पार्टनर से खरीदने की ज़रूरत नहीं है.
टेस्ट ग्राहक खाता पाने और पहले से तैयार डिवाइस के लिए एनरोलमेंट पोर्टल का ऐक्सेस पाने के लिए, हमसे संपर्क करें. हमें अपने कॉर्पोरेट ईमेल पते से ईमेल भेजें. यह ईमेल पता, किसी Google खाते से जुड़ा होना चाहिए. हमें एक या दो डिवाइसों के मैन्युफ़ैक्चरर और आईएमईआई नंबर बताएं. हम उन्हें आपके डेवलपमेंट खाते में जोड़ देंगे.
ध्यान रखें कि ज़ीरो-टच एनरोलमेंट की सुविधा, डीपीआई को अपने-आप डाउनलोड और इंस्टॉल करती है. इसलिए, प्रोविज़निंग की जांच करने से पहले, आपका डीपीआई Google Play पर उपलब्ध होना चाहिए. डीपीसी के डेवलपमेंट वर्शन के साथ टेस्ट नहीं किया जा सकता.
आईटी एडमिन के लिए सहायता
अगर आपको अपने कंसोल के इंटरफ़ेस या दस्तावेज़ में आईटी एडमिन की मदद करनी है, तो दिशा-निर्देशों के लिए आईटी एडमिन के लिए ज़ीरो-टच एनरोलमेंट लेख पढ़ें. अपने कंसोल के उपयोगकर्ताओं को भी सहायता केंद्र के उस लेख पर रीडायरेक्ट किया जा सकता है.
इस बारे में और पढ़ें
अपनी कंसोल में ज़ीरो-टच रजिस्ट्रेशन की सुविधा को इंटिग्रेट करने के लिए, ये दस्तावेज़ पढ़ें:
- Android Enterprise की सहायता टीम से संपर्क करें और आईटी एडमिन के लिए ज़ीरो-टच रजिस्ट्रेशन की सुविधा के बारे में पूछें.
- Android EMM डेवलपर साइट से खरीदार के डिवाइसों को प्रोविज़न करें.