com.google.android.gms.safetynet.SafetyNetApi |
The main entry point for interacting with SafetyNet.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SafetyNetApi.AttestationResponse | Response from attest(byte[], String) that contains a
Compatibility Test Suite attestation result. |
||||||||||
SafetyNetApi.AttestationResult |
This interface is deprecated.
use SafetyNetApi.AttestationResponse returned by attest(byte[], String) .
|
||||||||||
SafetyNetApi.HarmfulAppsResponse | A Response returned from listHarmfulApps() . |
||||||||||
SafetyNetApi.HarmfulAppsResult |
This interface is deprecated.
use SafetyNetApi.HarmfulAppsResponse returned from
listHarmfulApps() .
|
||||||||||
SafetyNetApi.RecaptchaTokenResponse | Response from verifyWithRecaptcha(String) . |
||||||||||
SafetyNetApi.RecaptchaTokenResult |
This interface is deprecated.
use SafetyNetApi.RecaptchaTokenResponse returned from
verifyWithRecaptcha(String) .
|
||||||||||
SafetyNetApi.SafeBrowsingResponse | Response for lookupUri(String, String, int...) . |
||||||||||
SafetyNetApi.SafeBrowsingResult |
This interface is deprecated.
use SafetyNetApi.SafeBrowsingResponse returned from lookupUri(String, String, int...) .
|
||||||||||
SafetyNetApi.VerifyAppsUserResponse | A Response to get user decisions for the Verify Apps API. |
||||||||||
SafetyNetApi.VerifyAppsUserResult |
This interface is deprecated.
use SafetyNetApi.VerifyAppsUserResponse returned from APIs in SafetyNetClient .
|
Parameters | |
---|---|
client |
GoogleApiClient :
The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method. |
nonce |
byte :
A cryptographic nonce used for anti-replay and tracking of requests. |
Returns | |
---|---|
PendingResult<SafetyNetApi.AttestationResult> |
See also:
This method is deprecated.
use enableVerifyApps()
.
Prompts the user to enable Verify Apps if it is currently turned off.
Parameters | |
---|---|
client |
GoogleApiClient
|
Returns | |
---|---|
PendingResult<SafetyNetApi.VerifyAppsUserResult> |
This method is deprecated.
use isVerifyAppsEnabled()
.
Checks whether Verify Apps is enabled.
Parameters | |
---|---|
client |
GoogleApiClient
|
Returns | |
---|---|
PendingResult<SafetyNetApi.VerifyAppsUserResult> |
This method is deprecated.
use isVerifyAppsEnabled()
.
Checks whether Verify Apps is enabled.
This call blocks and must not be called on the main thread.
Parameters | |
---|---|
context |
Context
|
Returns | |
---|---|
boolean |
This method is deprecated.
use listHarmfulApps()
.
Gets a list of known, potentially harmful apps installed.
Parameters | |
---|---|
client |
GoogleApiClient
|
Returns | |
---|---|
PendingResult<SafetyNetApi.HarmfulAppsResult> |
This method is deprecated.
use lookupUri(String, String, int...)
.
Checks whether a URI is known to have specific threats.
This call requires that the API key (generated in the developer console) be added to the application's manifest.
Parameters | |
---|---|
client |
GoogleApiClient :
The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method. |
uri |
String :
A String that represents the URI that should be looked up. |
threatTypes |
int :
integers from SafeBrowsingThreat to indicate that the URI
should be queried for these threat types. |
Returns | |
---|---|
PendingResult<SafetyNetApi.SafeBrowsingResult> |
This method is deprecated.
use lookupUri(String, String, int...)
.
Checks whether a URI is known to have specific threats.
Parameters | |
---|---|
client |
GoogleApiClient :
The GoogleApiClient to service the call. The client must be
connected using connect() before invoking this method. |
uri |
String :
A String that represents the URI that should be looked up. |
apiKey |
String :
The API key generated from the developer console described here:
https://developer.android.com/training/safebrowsing/index.html#api-key. |
threatTypes |
int :
integers from SafeBrowsingThreat to indicate that the URI
should be queried for these threat types. |
Returns | |
---|---|
PendingResult<SafetyNetApi.SafeBrowsingResult> |
This method is deprecated.
use verifyWithRecaptcha(String)
.
Provides user attestation with reCAPTCHA.
If reCAPTCHA is confident that this is a real user on a real device it will return a token with no challenge. Otherwise it will provide a visual/audio challenge to attest the humanness of the user before returning a token.
When you make a request with this API, you must provide your client GoogleApiClient
and site public key as parameters, and after the request completes, you can get the
SafetyNetApi.RecaptchaTokenResult
from the response.
Parameters | |
---|---|
client |
GoogleApiClient :
The GoogleApiClient to service the call. The client must be connected
using connect() before invoking this method. |
siteKey |
String :
A site public key registered for this app at
https://g.co/recaptcha/androidsignup |
Returns | |
---|---|
PendingResult<SafetyNetApi.RecaptchaTokenResult> |