ईएमएम इंटिग्रेशन गाइड

यह गाइड, एंटरप्राइज़ मोबिलिटी मैनेजमेंट (ईएमएम) की सेवा देने वाली कंपनियों को इंटिग्रेट करने में मदद करती है उनके कंसोल में ज़ीरो-टच रजिस्ट्रेशन की सुविधा होती है. रजिस्टर करने के बारे में ज़्यादा जानने और सबसे सही तरीके से जुड़ी सलाह देखने के लिए, नीचे दी गई जानकारी पढ़ें आपके DPC (डिवाइस नीति कंट्रोलर) के प्रावधान में मदद करना. अगर आपके पास कोई DPC है, आपको डिवाइसों को प्रॉविज़न करने के सबसे सही तरीकों की जानकारी मिलेगी. साथ ही, आपको मदद करने के लिए सलाह भी मिलेगी टेस्टिंग के लिए इस्तेमाल किया जा सकता है.

आईटी एडमिन के लिए सुविधाएं

कस्टमर एपीआई का इस्तेमाल करके, सीधे तौर पर 'पहले से तैयार डिवाइस' प्रोसेस को सेटअप करने में आईटी एडमिन की मदद करें आपका कंसोल. यहां कुछ ऐसे टास्क दिए गए हैं जिन्हें कोई आईटी एडमिन आपके कंसोल पर पूरा कर सकता है:

  • अपनी प्रोफ़ाइल और डिवाइस के हिसाब से, ज़ीरो-टच रजिस्ट्रेशन वाले कॉन्फ़िगरेशन बनाएं, उनमें बदलाव करें, और उन्हें मिटाएं मोबाइल से जुड़ी नीतियों के बारे में ज़्यादा जानें.
  • डिफ़ॉल्ट कॉन्फ़िगरेशन सेट करें, ताकि आपका DPC आने वाले समय में डिवाइसों को मैनेज कर सके संगठन की ओर से की गई खरीदारी.
  • डिवाइसों पर अलग-अलग कॉन्फ़िगरेशन लागू करें या 'पहले से तैयार डिवाइस' सुविधा से डिवाइसों को हटाएं रजिस्ट्रेशन.

ज़ीरो-टच रजिस्ट्रेशन की सुविधा के बारे में ज़्यादा जानने के लिए, खास जानकारी.

ज़रूरी शर्तें

ईएमएम कंसोल में पहले से तैयार डिवाइस को जोड़ने से पहले, पुष्टि करें कि समाधान इनके साथ काम करता है:

  • आपके ईएमएम समाधान के लिए, कंपनी के मालिकाना हक वाले Android 8.0 और उसके बाद के वर्शन (Pixel 7.1 और उसके बाद के वर्शन) का प्रावधान करना ज़रूरी है डिवाइस को पूरी तरह से मैनेज किए गए मोड में रखा गया है. कंपनी के मालिकाना हक वाले Android 10 या इसके बाद के वर्शन वाले डिवाइसों पर पूरी तरह से मैनेज की गई या वर्क प्रोफ़ाइल के तौर पर प्रावधान किया गया हो.
  • ज़ीरो-टच रजिस्ट्रेशन की सुविधा से DPC अपने-आप डाउनलोड और इंस्टॉल हो जाता है. DPC, Google Play में उपलब्ध होना चाहिए. हम Google Play पर काम करने वाले DPC की सूची बनाकर रखते हैं जिसे आईटी एडमिन, कस्टमर एपीआई या पोर्टल का इस्तेमाल करके कॉन्फ़िगर कर सकते हैं. सबमिट करें ईएमएम सेवा देने वाली कंपनी के समुदाय के ज़रिए प्रॉडक्ट में बदलाव करने का अनुरोध का इस्तेमाल करें.
  • कस्टमर एपीआई को कॉल करने के लिए, आपके ग्राहकों के पास पहले से तैयार डिवाइस वाला खाता होना चाहिए. पार्टनर रीसेलर, आईटी एडमिन के संगठन के लिए खाता तब सेट अप करता है, जब संगठन अपने डिवाइस खरीदता है.
  • डिवाइस, Google मोबाइल सेवाओं (GMS) के साथ काम करना चाहिए साथ ही, पहले से तैयार डिवाइस के लिए, Google Play services हमेशा चालू होनी चाहिए ताकि वह सही तरीके से काम करे.

एपीआई को कॉल करें

आपके कंसोल के उपयोगकर्ता (अपने Google खाते का इस्तेमाल करके) आपके एपीआई अनुरोधों को ग्राहक API. यह फ़्लो उस अनुमति से अलग होता है जिसके लिए आपने कार्रवाई की है की अनुमति देनी होगी. अपने ऐप्लिकेशन में ऐसा करने का तरीका जानने के लिए, अनुमति देना पढ़ें.

सेवा की शर्तें मैनेज करना

आपके उपयोगकर्ताओं को इससे पहले सेवा की नई शर्तें (सेवा की शर्तें) स्वीकार करनी होंगी एपीआई को कॉल किया जा रहा है. अगर एपीआई कॉल, एचटीटीपी 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://partner.android.com/zerotouch'

# 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 या एचटीटीपी) काम करती हैं, तो अनुरोध), तो मान के साथ HTTP हेडर X-GOOG-API-FORMAT-VERSION शामिल करें आपके अनुरोधों में 2. अगर आपका क्लाइंट विस्तृत गड़बड़ियों का समर्थन नहीं करता (.NET और अन्य), गड़बड़ी के मैसेज से मिलान करें.

आने वाले समय में जब हम सेवा की शर्तों को अपडेट करेंगे, तो अगर इस तरीके को अपनाया जाएगा, तो आपका ऐप्लिकेशन यह उपयोगकर्ता को सेवा की नई शर्तों को फिर से स्वीकार करने के लिए भेजता है.

आईटी एडमिन, ज़ीरो-टच रजिस्ट्रेशन पोर्टल का इस्तेमाल करके, उपयोगकर्ताओं को उनकी संगठन—ग्राहक एपीआई के ज़रिए ऐसा नहीं किया जा सकता. आईटी एडमिन भी ये काम कर सकते हैं: पोर्टल का इस्तेमाल करके डिवाइसों और कॉन्फ़िगरेशन को मैनेज करें. अगर आपको अपने कंसोल से पोर्टल पर जाएं या अपने दस्तावेज़ में इस यूआरएल का इस्तेमाल करें:

https://partner.android.com/zerotouch

आईटी एडमिन को इस बात की जानकारी दी जा सकती है कि उन्हें अपने Google खाता.

डिवाइस रजिस्टर करें

ज़ीरो-टच रजिस्ट्रेशन की सुविधा, डिवाइसों को रजिस्टर करने का एक तरीका है. यह एनएफ़सी की तरह है रजिस्ट्रेशन या क्यूआर-कोड रजिस्टर करना. आपके कंसोल में मैनेज किए जा रहे डिवाइस काम करें और आपका DPC पूरी तरह से मैनेज किए जा रहे डिवाइस मोड में चलना चाहिए.

ज़ीरो-टच रजिस्ट्रेशन की सुविधा, Android 8.0 या Android 8.0 या इसके बाद के वर्शन पर काम करने वाले उन डिवाइसों पर उपलब्ध है जिन पर 'पहले से तैयार डिवाइस' सुविधा काम करती है बाद में. आईटी एडमिन के लिए, किसी पार्टनर से ऐसे डिवाइस खरीदने ज़रूरी हैं जिन पर यह सुविधा काम करती है रीसेलर. आपका कंसोल ट्रैक कर सकता है आईटी एडमिन के कौनसे डिवाइस, पहले से तैयार डिवाइस के लिए उपलब्ध हैं customers.devices.list को कॉल किया जा रहा है.

रजिस्टर करने का तरीका यहां बताया गया है:

  1. डिवाइस पहली बार चालू होने पर या फ़ैक्ट्री के बाद Google के सर्वर की मदद से जांच करता है रीसेट करें).
  2. अगर आईटी एडमिन ने डिवाइस पर कोई कॉन्फ़िगरेशन लागू किया है, तो 'पहले से तैयार डिवाइस' सुविधा डिवाइस रजिस्टर करने पर, पूरी तरह से मैनेज किए गए डिवाइस का Android सेटअप विज़र्ड चलाया जाता है. साथ ही, कॉन्फ़िगरेशन के मेटाडेटा वाली स्क्रीन.
  3. पहले से तैयार डिवाइस को Google Play से डाउनलोड और इंस्टॉल किया जाता है.
  4. आपके 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 इंस्टेंस को ढूंढने के लिए, आखिरी पाथ कॉम्पोनेंट का इस्तेमाल करके. उदाहरण के लिए नीचे दिखाया गया है कि आपके 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...

अगर आपको अपने कंसोल के यूज़र इंटरफ़ेस में DPC का नाम दिखाना है, तो 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 इंटेंट का इस्तेमाल करके, आपके DPC को लॉन्च किया जाता है. सिस्टम इसमें वैल्यू भेजता है आपके DPC के लिए android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE JSON प्रॉपर्टी अतिरिक्त के रूप में. आपका डीपीसी, प्रावधान सेटिंग को यहां से पढ़ सकता है: PersistableBundle के लिए एक जैसी कुंजियों का इस्तेमाल करें.

सुझाया गया—नीचे दिए गए इंटेंट एक्स्ट्रा का इस्तेमाल करें DPC सेट अप करने के लिए:

इसका सुझाव नहीं दिया जाता—इसे शामिल न करें अतिरिक्त सुविधाएं जिनका इस्तेमाल डिवाइस रजिस्टर करने के अन्य तरीकों में किया जा सकता है:

अपने DPC में इन सेटिंग को एक्सट्रैक्ट करने और इस्तेमाल करने का तरीका जानने के लिए, प्रावधान पढ़ें ग्राहक डिवाइस.

डेवलपमेंट और टेस्टिंग

अपने कंसोल के ज़ीरो-टच रजिस्ट्रेशन की सुविधाओं को डेवलप और टेस्ट करने के लिए, आपको निम्न:

  • इस्तेमाल किया जा सकने वाला डिवाइस
  • ग्राहक के लिए, 'पहले से तैयार डिवाइस' सुविधा वाला खाता

पहले से तैयार डिवाइस पर काम करने वाले डिवाइसों पर डेवलप और टेस्ट करें रजिस्ट्रेशन के लिए इस्तेमाल किया जा सकता है. आपको तय करने की ज़रूरत नहीं है रीसेलर पार्टनर से अपने डेवलपमेंट डिवाइस खरीदें.

टेस्ट ग्राहक खाता और ज़ीरो-टच रजिस्ट्रेशन की सुविधा वाला पोर्टल. हमें अपने इस कॉर्पोरेट ईमेल पते से ईमेल भेजें Google से जुड़ा खाता. हमें मैन्युफ़ैक्चरर के बारे में बताएं एक या दो डिवाइस की IMEI संख्या जोड़ सकते हैं और हम उन्हें आपके डिवाइस के डेवलपमेंट में जोड़ देंगे जोड़ें.

याद रखें, क्योंकि ज़ीरो-टच रजिस्ट्रेशन की सुविधा, Google News DPC: इससे पहले कि आप परीक्षण कर सकें, आपका DPC Google Play से उपलब्ध होना चाहिए प्रॉविज़निंग. अपने DPC के डेवलपमेंट वर्शन से जांच नहीं की जा सकती.

आईटी एडमिन के लिए सहायता

अगर आपको अपने कंसोल के इंटरफ़ेस या दस्तावेज़ में आईटी एडमिन की मदद करनी है, तो ज़्यादा जानकारी के लिए, आईटी एडमिन के लिए पहले से तैयार डिवाइस लेख पढ़ें. आपने लोगों तक पहुंचाया मुफ़्त में आपके कंसोल के उपयोगकर्ताओं को सहायता केंद्र के उस लेख पर भी ले जा सकता है.

इसके बारे में और पढ़ें

अपने डिवाइसों में ज़ीरो-टच रजिस्ट्रेशन की सुविधा को इंटिग्रेट करने के लिए, ये दस्तावेज़ पढ़ें कंसोल: