इस पेज पर, इंटिग्रिटी वर्डिक्ट से जुड़ी समस्याओं को हल करने का तरीका बताया गया है.
इंटिग्रिटी टोकन का अनुरोध करने के बाद, आपके पास उपयोगकर्ता को Google Play का डायलॉग बॉक्स दिखाने का विकल्प होता है. डायलॉग तब दिखाया जा सकता है, जब इंटिग्रिटी वर्डिक्ट में एक या उससे ज़्यादा समस्याएं हों या Integrity API के अनुरोध के दौरान कोई गड़बड़ी हुई हो. डायलॉग बॉक्स बंद होने के बाद, इंटिग्रिटी टोकन का एक और अनुरोध करके, यह पुष्टि की जा सकती है कि समस्या ठीक हो गई है या नहीं. अगर स्टैंडर्ड अनुरोध किए जाते हैं, तो आपको नया फ़ैसला पाने के लिए, टोकन देने वाली सेवा को फिर से वॉर्म अप करना होगा.
नतीजे से जुड़ी समस्या को ठीक करने के लिए, इंटिग्रिटी डायलॉग का अनुरोध करना
जब क्लाइंट, इंटेग्रिटी टोकन का अनुरोध करता है, तो StandardIntegrityToken (स्टैंडर्ड एपीआई) और IntegrityTokenResponse (क्लासिक एपीआई) में दिए गए तरीके का इस्तेमाल किया जा सकता है: showDialog(Activity activity, int integrityDialogTypeCode).
यहां बताया गया है कि GET_LICENSED डायलॉग कोड का इस्तेमाल करके, समस्या हल करने वाला डायलॉग दिखाने के लिए, Play Integrity API का इस्तेमाल कैसे किया जा सकता है.
इस सेक्शन के बाद, अन्य डायलॉग कोड की सूची दी गई है. आपका ऐप्लिकेशन इनके लिए अनुरोध कर सकता है.
अपने ऐप्लिकेशन से इंटिग्रिटी टोकन का अनुरोध करें और टोकन को अपने सर्वर पर भेजें. स्टैंडर्ड या क्लासिक अनुरोध का इस्तेमाल किया जा सकता है.
Kotlin
// Request an integrity token val tokenResponse: StandardIntegrityToken = requestIntegrityToken() // Send token to app server and get response on what to do next val yourServerResponse: YourServerResponse = sendToServer(tokenResponse.token())Java
// Request an integrity token StandardIntegrityToken tokenResponse = requestIntegrityToken(); // Send token to app server and get response on what to do next YourServerResponse yourServerResponse = sendToServer(tokenResponse.token());Unity
// Request an integrity token StandardIntegrityToken tokenResponse = RequestIntegrityToken(); // Send token to app server and get response on what to do next YourServerResponse yourServerResponse = sendToServer(tokenResponse.Token);Unreal Engine
// Request an integrity token StandardIntegrityToken* Response = RequestIntegrityToken(); // Send token to app server and get response on what to do next YourServerResponse YourServerResponse = SendToServer(Response->Token);नेटिव
/// Request an integrity token StandardIntegrityToken* response = requestIntegrityToken(); /// Send token to app server and get response on what to do next YourServerResponse yourServerResponse = sendToServer(StandardIntegrityToken_getToken(response));अपने सर्वर पर, इंटेग्रिटी टोकन को डिक्रिप्ट करें और
appLicensingVerdictफ़ील्ड की जांच करें. यह कुछ ऐसा दिख सकता है:// Licensing issue { ... "accountDetails": { "appLicensingVerdict": "UNLICENSED" } }अगर टोकन में
appLicensingVerdict: "UNLICENSED"शामिल है, तो अपने ऐप्लिकेशन क्लाइंट को जवाब दें और उससे लाइसेंस वाला डायलॉग बॉक्स दिखाने का अनुरोध करें:Kotlin
private fun getDialogTypeCode(integrityToken: String): Int{ // Get licensing verdict from decrypted and verified integritytoken val licensingVerdict: String = getLicensingVerdictFromDecryptedToken(integrityToken) return if (licensingVerdict == "UNLICENSED") { 1 // GET_LICENSED } else 0 }Java
private int getDialogTypeCode(String integrityToken) { // Get licensing verdict from decrypted and verified integrityToken String licensingVerdict = getLicensingVerdictFromDecryptedToken(integrityToken); if (licensingVerdict.equals("UNLICENSED")) { return 1; // GET_LICENSED } return 0; }Unity
private int GetDialogTypeCode(string IntegrityToken) { // Get licensing verdict from decrypted and verified integrityToken string licensingVerdict = GetLicensingVerdictFromDecryptedToken(IntegrityToken); if (licensingVerdict == "UNLICENSED") { return 1; // GET_LICENSED } return 0; }Unreal Engine
private int GetDialogTypeCode(FString IntegrityToken) { // Get licensing verdict from decrypted and verified integrityToken FString LicensingVerdict = GetLicensingVerdictFromDecryptedToken(IntegrityToken); if (LicensingVerdict == "UNLICENSED") { return 1; // GET_LICENSED } return 0; }नेटिव
private int getDialogTypeCode(string integrity_token) { /// Get licensing verdict from decrypted and verified integrityToken string licensing_verdict = getLicensingVerdictFromDecryptedToken(integrity_token); if (licensing_verdict == "UNLICENSED") { return 1; // GET_LICENSED } return 0; }अपने ऐप्लिकेशन पर, सर्वर से मिले कोड के साथ
showDialogको कॉल करें:Kotlin
// Show dialog as indicated by the server val showDialogType: Int? = yourServerResponse.integrityDialogTypeCode() if (showDialogType == null) { return } // Create dialog request val dialogRequest = StandardIntegrityDialogRequest.builder() .setActivity(activity) .setTypeCode(showDialogType) .setStandardIntegrityResponse(StandardIntegrityResponse.TokenResponse(token)) .build() // Call showDialog, the dialog will be shown on top of the provided activity // and the task will complete when the dialog is closed. val result: Task<Int> = standardIntegrityManager.showDialog(dialogRequest) // Handle response code, call the Integrity API again to confirm that the // verdict issue has been resolved.Java
// Show dialog as indicated by the server @Nullable Integer showDialogType = yourServerResponse.integrityDialogTypeCode(); if (showDialogType == null) { return; } // Create dialog request StandardIntegrityDialogRequest dialogRequest = StandardIntegrityDialogRequest.builder() .setActivity(getActivity()) .setTypeCode(showDialogTypeCode) .setStandardIntegrityResponse(new StandardIntegrityResponse.TokenResponse(token)) .build(); // Call showDialog, the dialog will be shown on top of the provided activity // and the task will complete when the dialog is closed. Task<Integer> result = standardIntegrityManager.showDialog(dialogRequest); // Handle response code, call the Integrity API again to confirm that the // verdict issue has been resolved.Unity
// Initialize the V2 manager. Requires Play Integrity Unity Plugin v2.0.0 or // higher. var standardIntegrityManager = new StandardIntegrityManagerV2(); IEnumerator ShowDialogCoroutine() { int showDialogType = yourServerResponse.IntegrityDialogTypeCode(); PlayAsyncOperation<IntegrityDialogResponseCode, StandardIntegrityError> showDialogTask; using (var activity = UnityPlayerHelper.GetCurrentActivity()) { // Create a dialog request var dialogRequest = new StandardIntegrityDialogRequest(tokenResponse, activity, showDialogType); // Call showDialog with the request, the dialog will be shown on top of the // provided activity and complete when the dialog is closed. showDialogTask = standardIntegrityManager.ShowDialog(dialogRequest); } // Wait for PlayAsyncOperation to complete. yield return showDialogTask; // Handle response code, call the Integrity API again to confirm that the // verdict issue been resolved. }Unreal Engine
// .h void MyClass::OnShowDialogCompleted( EStandardIntegrityErrorCode Error, EIntegrityDialogResponseCode Response) { // Handle response code, call the Integrity API again to confirm that the // verdict issue has been resolved. } // .cpp void MyClass::RequestIntegrityToken() { UStandardIntegrityToken* Response = ... int TypeCode = YourServerResponse.integrityDialogTypeCode(); // Create a delegate to bind the callback function. FShowDialogStandardOperationCompletedDelegate Delegate; // Bind the completion handler (OnShowDialogCompleted) to the delegate. Delegate.BindDynamic(this, &MyClass::OnShowDialogCompleted); // Call ShowDialog with TypeCode which completes when the dialog is closed. Response->ShowDialog(TypeCode, Delegate); }नेटिव
// Show dialog as indicated by the server int show_dialog_type = yourServerResponse.integrityDialogTypeCode(); if(show_dialog_type == 0){ return; } /// Create dialog request StandardIntegrityDialogRequest* dialog_request; StandardIntegrityDialogRequest_create(&dialog_request); StandardIntegrityDialogRequest_setTypeCode(dialog_request, show_dialog_type); StandardIntegrityDialogRequest_setActivity(dialog_request, activity); StandardIntegrityDialogRequest_setStandardIntegrityToken(dialog_request, token_response); /// Call showDialog with the dialog request. The dialog will be shown on top /// of the provided activity and complete when the dialog is closed by the /// user. StandardIntegrityDialogResponse* dialog_response; StandardIntegrityErrorCode error_code = StandardIntegrityManager_showDialog(dialog_request, &dialog_response); /// Use polling to wait for the async operation to complete. Note, the polling /// shouldn't block the thread where the StandardIntegrityManager is running. IntegrityDialogResponseCode response_code = INTEGRITY_DIALOG_RESPONSE_UNKNOWN; while (error_code == STANDARD_INTEGRITY_NO_ERROR) { error_code = StandardIntegrityDialogResponse_getResponseCode(dialog_response, &response_code); if(response_code != INTEGRITY_DIALOG_RESPONSE_UNKNOWN){ break; } } /// Free memory StandardIntegrityDialogRequest_destroy(dialog_request); StandardIntegrityDialogResponse_destroy(dialog_response); /// Handle response code, call the Integrity API again to confirm that the /// verdict issues have been resolved.डायलॉग बॉक्स, दी गई गतिविधि के सबसे ऊपर दिखता है. जब उपयोगकर्ता डायलॉग बंद कर देता है, तो टास्क रिस्पॉन्स कोड के साथ पूरा हो जाता है.
(ज़रूरी नहीं) अन्य डायलॉग दिखाने के लिए, किसी दूसरे टोकन का अनुरोध करें. अगर आपको स्टैंडर्ड अनुरोध करने हैं, तो आपको टोकन देने वाली सेवा को फिर से वॉर्म अप करना होगा, ताकि नया फ़ैसला मिल सके.
क्लाइंट साइड के अपवाद को ठीक करने के लिए, इंटिग्रिटी डायलॉग का अनुरोध करना
अगर Integrity API का कोई अनुरोध StandardIntegrityException (स्टैंडर्ड एपीआई) या IntegrityServiceException (क्लासिक एपीआई) की वजह से पूरा नहीं हो पाता है और गड़बड़ी को ठीक किया जा सकता है, तो गड़बड़ी को ठीक करने के लिए GET_INTEGRITY या GET_STRONG_INTEGRITY डायलॉग का इस्तेमाल किया जा सकता है.
यहां बताया गया है कि GET_INTEGRITY डायलॉग का इस्तेमाल करके, Integrity API से मिली क्लाइंट साइड की गड़बड़ी को कैसे ठीक किया जा सकता है.
देखें कि Integrity API के अनुरोध से मिले अपवाद को ठीक किया जा सकता है या नहीं.
Kotlin
private fun isExceptionRemediable(exception: ExecutionException): Boolean { val cause = exception.cause if (cause is StandardIntegrityException && cause.isRemediable) { return true } return false }Java
private boolean isExceptionRemediable(ExecutionException exception) { Throwable cause = exception.getCause(); if (cause instanceof StandardIntegrityException integrityException && integrityException.isRemediable()) { return true; } return false; }Unity
private bool IsExceptionRemediable(StandardIntegrityError error) { // Check if the operation resulted in a remediable error if (error != null && error.ErrorCode != StandardIntegrityErrorCode.NoError && error.IsRemediable) { return true; } return false; }नेटिव
bool IsErrorRemediable(StandardIntegrityToken* token) { /// Check if the error associated with the token is remediable bool isRemediable = false; if(StandardIntegrityToken_getIsRemediable(response, &isRemediable) == STANDARD_INTEGRITY_NO_ERROR){ return isRemediable; } return false; }अगर अपवाद को ठीक किया जा सकता है, तो वापस किए गए अपवाद का इस्तेमाल करके,
GET_INTEGRITYडायलॉग का अनुरोध करें. डायलॉग बॉक्स, दी गई गतिविधि के ऊपर दिखेगा. साथ ही, उपयोगकर्ता के डायलॉग बॉक्स बंद करने के बाद, टास्क रिस्पॉन्स कोड के साथ पूरा हो जाएगा.Kotlin
private fun showDialog(exception: StandardIntegrityException) { // Create a dialog request val standardIntegrityDialogRequest = StandardIntegrityDialogRequest.builder() .setActivity(activity) .setType(IntegrityDialogTypeCode.GET_INTEGRITY) .setStandardIntegrityResponse(ExceptionDetails(exception)) .build() // Request dialog val responseCode: Task<Int> = standardIntegrityManager.showDialog(standardIntegrityDialogRequest) }Java
private void showDialog(StandardIntegrityException exception) { // Create a dialog request StandardIntegrityDialogRequest standardIntegrityDialogRequest = StandardIntegrityDialogRequest.builder() .setActivity(this.activity) .setType(IntegrityDialogTypeCode.GET_INTEGRITY) .setStandardIntegrityResponse(new ExceptionDetails(exception)) .build(); // Request dialog Task<Integer> responseCode = standardIntegrityManager.showDialog(standardIntegrityDialogRequest); }Unity
// Initialize the V2 manager. Requires Play Integrity Unity Plugin v2.0.0 or // higher. var standardIntegrityManager = new StandardIntegrityManagerV2(); IEnumerator ShowDialogToFixError(StandardIntegrityError error) { PlayAsyncOperation<IntegrityDialogResponseCode, StandardIntegrityError> showDialogTask; using (var activity = UnityPlayerHelper.GetCurrentActivity()) { // Create a dialog request using the error var dialogRequest = new StandardIntegrityDialogRequest(error, activity, GET_INTEGRITY_DIALOG); // Request dialog showDialogTask = standardIntegrityManager.ShowDialog(dialogRequest); } // Wait for PlayAsyncOperation to complete. yield return showDialogTask; }नेटिव
private void showDialogToFixError(StandardIntegrityToken* token) { /// If the token request failed, and the underlying error is not fixable /// then return early if(isErrorRemediable(token)) { return; } /// Create dialog request StandardIntegrityDialogRequest* dialog_request; StandardIntegrityDialogRequest_create(&dialog_request); StandardIntegrityDialogRequest_setTypeCode(dialog_request, kGetIntegrityDialogTypeCode); StandardIntegrityDialogRequest_setActivity(dialog_request, activity); StandardIntegrityDialogRequest_setStandardIntegrityToken(dialog_request, token_response); /// Call showDialog with the dialog request. The dialog will be shown on /// top of the provided activity and complete when the dialog is closed by /// the user. StandardIntegrityDialogResponse* dialog_response; StandardIntegrityErrorCode error_code = StandardIntegrityManager_showDialog(dialog_request, &dialog_response); /// Use polling to wait for the async operation to complete. /// Note, the polling shouldn't block the thread where the /// StandardIntegrityManager is running. IntegrityDialogResponseCode response_code = INTEGRITY_DIALOG_RESPONSE_UNKNOWN; while (error_code == STANDARD_INTEGRITY_NO_ERROR) { error_code = StandardIntegrityDialogResponse_getResponseCode(response, &response_code); if(response_code != INTEGRITY_DIALOG_RESPONSE_UNKNOWN){ break; } } /// Free memory StandardIntegrityDialogRequest_destroy(dialog_request); StandardIntegrityDialogResponse_destroy(dialog_response); }अगर रिस्पॉन्स कोड से पता चलता है कि अनुरोध पूरा हो गया है, तो इंटिग्रिटी टोकन के लिए अगला अनुरोध बिना किसी अपवाद के पूरा हो जाना चाहिए. अगर स्टैंडर्ड अनुरोध किए जाते हैं, तो नया फ़ैसला पाने के लिए, आपको टोकन देने वाली सेवा को फिर से वॉर्म अप करना होगा.
इंटिग्रिटी डायलॉग कोड
GET_LICENSED (टाइप कोड 1)
नतीजे से जुड़ी समस्या
यह डायलॉग बॉक्स, इन दो समस्याओं के लिए सही है:
- बिना अनुमति के ऐक्सेस:
appLicensingVerdict: "UNLICENSED". इसका मतलब है कि उपयोगकर्ता खाते के पास आपके ऐप्लिकेशन को इस्तेमाल करने का अधिकार नहीं है. ऐसा तब हो सकता है, जब उपयोगकर्ता ने इसे अनजान सोर्स से इंस्टॉल किया हो या Google Play के बजाय किसी दूसरे ऐप स्टोर से डाउनलोड किया हो. - छेड़छाड़ किया गया ऐप्लिकेशन:
appRecognitionVerdict: "UNRECOGNIZED_VERSION". इसका मतलब है कि आपके ऐप्लिकेशन की बाइनरी में बदलाव किया गया है या यह ऐसा वर्शन है जिसे Google Play ने मंज़ूरी नहीं दी है.
बचा हुआ डेटा एक्सपोर्ट करना
उपयोगकर्ता को GET_LICENSED डायलॉग दिखाया जा सकता है, ताकि वह Google Play से असली ऐप्लिकेशन डाउनलोड कर सके. यह डायलॉग बॉक्स, दोनों स्थितियों में काम करता है:
- बिना लाइसेंस वाले उपयोगकर्ता को Play का लाइसेंस मिलता है. इससे उपयोगकर्ता को Google Play से ऐप्लिकेशन के अपडेट मिलते हैं.
- अगर किसी उपयोगकर्ता के पास ऐप्लिकेशन का छेड़छाड़ किया गया वर्शन है, तो यह उसे Google Play से ऐप्लिकेशन का ओरिजनल वर्शन इंस्टॉल करने के लिए गाइड करता है.
जब उपयोगकर्ता डायलॉग बॉक्स में दी गई कार्रवाई पूरी कर लेता है, तो इंटिग्रिटी की अगली जांच में
appLicensingVerdict: "LICENSED" और
appRecognitionVerdict: "PLAY_RECOGNIZED" नतीजे मिलते हैं.
उपयोगकर्ता अनुभव का उदाहरण
CLOSE_UNKNOWN_ACCESS_RISK (टाइप कोड 2)
नतीजे से जुड़ी समस्या
जब environmentDetails.appAccessRiskVerdict.appsDetected में "UNKNOWN_CAPTURING" या "UNKNOWN_CONTROLLING" शामिल होता है, तो इसका मतलब है कि डिवाइस पर ऐसे अन्य ऐप्लिकेशन चल रहे हैं जो स्क्रीन कैप्चर कर सकते हैं या डिवाइस को कंट्रोल कर सकते हैं. ये ऐप्लिकेशन, Google Play से इंस्टॉल नहीं किए गए हैं या डिवाइस बनाने वाली कंपनी ने सिस्टम के पार्टिशन पर उन्हें पहले से लोड नहीं किया है.
बचा हुआ डेटा एक्सपोर्ट करना
CLOSE_UNKNOWN_ACCESS_RISK डायलॉग बॉक्स दिखाकर, उपयोगकर्ता को ऐसे सभी अनजान ऐप्लिकेशन बंद करने के लिए कहा जा सकता है जो स्क्रीन कैप्चर कर सकते हैं या डिवाइस को कंट्रोल कर सकते हैं.
अगर उपयोगकर्ता Close all बटन पर टैप करता है, तो ऐसे सभी ऐप्लिकेशन बंद हो जाते हैं.
उपयोगकर्ता अनुभव का उदाहरण
CLOSE_ALL_ACCESS_RISK (टाइप कोड 3)
नतीजे से जुड़ी समस्या
अगर environmentDetails.appAccessRiskVerdict.appsDetected में "KNOWN_CAPTURING", "KNOWN_CONTROLLING","UNKNOWN_CAPTURING" या "UNKNOWN_CONTROLLING" में से कोई भी मौजूद है, तो इसका मतलब है कि डिवाइस पर ऐसे ऐप्लिकेशन चल रहे हैं जो स्क्रीन कैप्चर कर सकते हैं या डिवाइस को कंट्रोल कर सकते हैं.
बचा हुआ डेटा एक्सपोर्ट करना
CLOSE_ALL_ACCESS_RISK डायलॉग दिखाकर, उपयोगकर्ता को उन सभी ऐप्लिकेशन को बंद करने के लिए कहा जा सकता है जो स्क्रीन कैप्चर कर सकते हैं या डिवाइस को कंट्रोल कर सकते हैं. अगर उपयोगकर्ता Close all बटन पर टैप करता है, तो डिवाइस पर ऐसे सभी ऐप्लिकेशन बंद हो जाते हैं.
उपयोगकर्ता अनुभव का उदाहरण
GET_INTEGRITY (टाइप कोड 4)
नतीजे से जुड़ी समस्या
यह डायलॉग, इनमें से किसी भी समस्या के लिए सही है:
डिवाइस की कमज़ोर इंटिग्रिटी: जब
deviceRecognitionVerdictमेंMEETS_DEVICE_INTEGRITYशामिल नहीं होता है, तो हो सकता है कि डिवाइस, Android की सुविधा वाला असली और सर्टिफ़ाइड डिवाइस न हो. उदाहरण के लिए, ऐसा तब हो सकता है, जब डिवाइस का बूटलोडर अनलॉक हो या लोड किया गया Android OS, डिवाइस बनाने वाली कंपनी की सर्टिफ़ाइड इमेज न हो.बिना अनुमति के ऐक्सेस:
appLicensingVerdict: "UNLICENSED". इसका मतलब है कि उपयोगकर्ता खाते के पास आपके ऐप्लिकेशन को इस्तेमाल करने का अधिकार नहीं है. ऐसा तब हो सकता है, जब उपयोगकर्ता ने इसे अनजान सोर्स से इंस्टॉल किया हो या Google Play के बजाय किसी दूसरे ऐप स्टोर से डाउनलोड किया हो.छेड़छाड़ किया गया ऐप्लिकेशन:
appRecognitionVerdict: "UNRECOGNIZED_VERSION". इसका मतलब है कि आपके ऐप्लिकेशन की बाइनरी में बदलाव किया गया है या यह ऐसा वर्शन है जिसे Google Play ने मंज़ूरी नहीं दी है.क्लाइंट साइड से जुड़ी गड़बड़ियां: जब Integrity API के अनुरोध के दौरान, ठीक की जा सकने वाली कोई गड़बड़ी होती है. ठीक किए जा सकने वाले अपवाद, Integrity API के अपवाद होते हैं. इनमें गड़बड़ी के कोड शामिल होते हैं. जैसे,
PLAY_SERVICES_VERSION_OUTDATED,NETWORK_ERROR,PLAY_SERVICES_NOT_FOUNDवगैरह.exception.isRemediable()तरीके का इस्तेमाल करके, यह पता लगाया जा सकता है कि डायलॉग बॉक्स की मदद से किसी अपवाद को ठीक किया जा सकता है या नहीं.
बचा हुआ डेटा एक्सपोर्ट करना
GET_INTEGRITY डायलॉग को इस तरह से डिज़ाइन किया गया है कि उपयोगकर्ता को बेहतर अनुभव मिले. इसके लिए, समस्या को हल करने के कई चरणों को एक ही, लगातार चलने वाले फ़्लो में मैनेज किया जाता है. इससे उपयोगकर्ता को अलग-अलग समस्याओं को ठीक करने के लिए, कई अलग-अलग डायलॉग बॉक्स के साथ इंटरैक्ट करने की ज़रूरत नहीं पड़ती.
डायलॉग का अनुरोध करने पर, यह अपने-आप पता लगा लेता है कि टारगेट किए गए नतीजों से जुड़ी कौनसी समस्याएं मौजूद हैं. साथ ही, उन्हें ठीक करने के लिए सही तरीके बताता है. इसका मतलब है कि एक डायलॉग अनुरोध से, एक साथ कई समस्याओं को हल किया जा सकता है. इनमें ये शामिल हैं:
- डिवाइस की सुरक्षा: अगर डिवाइस की सुरक्षा से जुड़ी कोई समस्या मिलती है, तो डायलॉग बॉक्स में उपयोगकर्ता को डिवाइस की सुरक्षा की स्थिति को बेहतर बनाने के लिए निर्देश दिए जाएंगे. इससे
MEETS_DEVICE_INTEGRITYनतीजे की ज़रूरी शर्तें पूरी की जा सकेंगी. - ऐप इंटेग्रिटी: अगर बिना अनुमति के ऐक्सेस या ऐप्लिकेशन से छेड़छाड़ जैसी समस्याओं का पता चलता है, तो डायलॉग बॉक्स उपयोगकर्ताओं को Play Store से ऐप्लिकेशन डाउनलोड करने के लिए कहेगा, ताकि उन्हें ठीक किया जा सके.
- क्लाइंट-साइड अपवाद: डायलॉग बॉक्स, Integrity API के अपवाद की वजह से होने वाली किसी भी समस्या की जांच करता है और उसे हल करने की कोशिश करता है. उदाहरण के लिए, यह उपयोगकर्ता को Google Play services के पुराने वर्शन को अपडेट करने के लिए कह सकता है.
उपयोगकर्ता अनुभव का उदाहरण
GET_STRONG_INTEGRITY (टाइप कोड 5)
नतीजे से जुड़ी समस्या
इस डायलॉग को उन सभी समस्याओं को ठीक करने के लिए डिज़ाइन किया गया है जिन्हें GET_INTEGRITY ठीक करता है. साथ ही, इसमें उन समस्याओं को ठीक करने की सुविधा भी जोड़ी गई है जिनकी वजह से किसी डिवाइस को MEETS_STRONG_INTEGRITY वर्डिक्ट नहीं मिल पाता. इसके अलावा, यह Play Protect वर्डिक्ट से जुड़ी समस्याओं को भी ठीक करता है.
बचा हुआ डेटा एक्सपोर्ट करना
GET_STRONG_INTEGRITY को उपयोगकर्ता के अनुभव को बेहतर बनाने के लिए डिज़ाइन किया गया है. इसके लिए, एक ही फ़्लो में समस्या को हल करने के कई चरणों को पूरा किया जाता है. डायलॉग बॉक्स, पते से जुड़ी समस्याओं की अपने-आप जांच करता है. इनमें ये समस्याएं शामिल हैं:
- डिवाइस की सुरक्षा: अगर डिवाइस की सुरक्षा से जुड़ी कोई समस्या मिलती है, तो डायलॉग बॉक्स में उपयोगकर्ता को डिवाइस की सुरक्षा की स्थिति को बेहतर बनाने के लिए निर्देश दिए जाएंगे. इससे
MEETS_STRONG_INTEGRITYनतीजे की ज़रूरी शर्तें पूरी की जा सकेंगी. Play Protect की स्थिति: अगर
playProtectVerdictकिसी समस्या का पता लगाता है, तो डायलॉग बॉक्स में उपयोगकर्ता को उसे ठीक करने का तरीका बताया जाएगा:- अगर Play Protect बंद है (
playProtectVerdict == POSSIBLE_RISK), तो डायलॉग बॉक्स में उपयोगकर्ता को इसे चालू करने और डिवाइस पर मौजूद सभी ऐप्लिकेशन को स्कैन करने के लिए कहा जाएगा. - अगर नुकसान पहुंचाने वाले ऐप्लिकेशन (
playProtectVerdict == MEDIUM_RISKयाHIGH_RISK) का पता चलता है, तो डायलॉग बॉक्स में उपयोगकर्ता को Google Play Protect का इस्तेमाल करके, उन्हें अनइंस्टॉल करने के लिए कहा जाएगा.
- अगर Play Protect बंद है (
ऐप इंटेग्रिटी: अगर बिना अनुमति के ऐक्सेस या ऐप्लिकेशन से छेड़छाड़ जैसी समस्याओं का पता चलता है, तो डायलॉग बॉक्स में उपयोगकर्ता को समस्या ठीक करने के लिए, Play Store से ऐप्लिकेशन डाउनलोड करने के लिए कहा जाएगा.
क्लाइंट-साइड से जुड़ी गड़बड़ियां: डायलॉग बॉक्स, Integrity API से जुड़ी गड़बड़ी की वजह बनने वाली किसी भी समस्या को हल करने की कोशिश भी करता है. उदाहरण के लिए, अगर Google Play services बंद है, तो यह उपयोगकर्ता को इसे चालू करने के लिए कह सकता है. ठीक किए जा सकने वाले अपवाद, Integrity API के अपवाद होते हैं. इनमें गड़बड़ी के कोड शामिल होते हैं. जैसे,
PLAY_SERVICES_VERSION_OUTDATED,NETWORK_ERRORयाPLAY_SERVICES_NOT_FOUND.exception.isRemediable()तरीके का इस्तेमाल करके, यह पता लगाया जा सकता है कि डायलॉग की मदद से गड़बड़ी को ठीक किया जा सकता है या नहीं.
उपयोगकर्ता अनुभव का उदाहरण