StandardIntegrityManager

public interface StandardIntegrityManager

com.google.android.play.core.integrity.StandardIntegrityManager


管理完整性資訊的要求。

摘要

巢狀類別

class StandardIntegrityManager.PrepareIntegrityTokenRequest

請求 StandardIntegrityManager.prepareIntegrityToken(PrepareIntegrityTokenRequest)。 

class StandardIntegrityManager.StandardIntegrityToken

StandardIntegrityManager.StandardIntegrityTokenProvider.request(StandardIntegrityTokenRequest) 的回應。 

interface StandardIntegrityManager.StandardIntegrityTokenProvider

標準完整性權杖供應工具。 

class StandardIntegrityManager.StandardIntegrityTokenRequest

請求 StandardIntegrityManager.StandardIntegrityTokenProvider.request(StandardIntegrityTokenRequest)。 

公用方法

abstract Task<StandardIntegrityManager.StandardIntegrityTokenProvider> prepareIntegrityToken(StandardIntegrityManager.PrepareIntegrityTokenRequest request)

準備完整性權杖,並讓其可以透過 StandardIntegrityManager.StandardIntegrityTokenProvider 提出要求。

abstract Task<Integer> showDialog(StandardIntegrityManager.StandardIntegrityDialogRequest request)

向使用者顯示對話方塊。

公用方法

prepareIntegrityToken

public abstract Task<StandardIntegrityManager.StandardIntegrityTokenProvider> prepareIntegrityToken (StandardIntegrityManager.PrepareIntegrityTokenRequest request)

準備完整性權杖,並讓其可以透過 StandardIntegrityManager.StandardIntegrityTokenProvider 提出要求。

您可以不時呼叫此方法來重新整理產生的 StandardIntegrityManager.StandardIntegrityTokenProvider

請注意,這個 API 會呼叫 Google 伺服器,因此需要網路連線。

參數
request StandardIntegrityManager.PrepareIntegrityTokenRequest:用於準備完整性憑證的物件。

傳回
Task<StandardIntegrityManager.StandardIntegrityTokenProvider> 在 prepareIntegrityToken 流程成功或失敗時完成的 Task。如果失敗,系統會擲回納入 TaskStandardIntegrityException

showDialog

public abstract Task<Integer> showDialog (StandardIntegrityDialogRequest request)

向使用者顯示對話方塊。

每個 StandardIntegrityManager.StandardIntegrityDialogRequest.StandardIntegrityResponse 只能呼叫這個方法一次。

注意:程式庫 1.5.0 版新增此功能。

參數
request IntegrityDialogRequest:包含要顯示的對話方塊設定。

傳回
Task<Integer> 透過 IntegrityDialogResponseCode 完成的 Task,用於表示 showDialog 流程成功或失敗。