Stay organized with collections
Save and categorize content based on your preferences.
IntegrityTokenRequest.Builder
public
static
abstract
class
IntegrityTokenRequest.Builder
extends Object
java.lang.Object
|
↳ |
com.google.android.play.core.integrity.IntegrityTokenRequest.Builder
|
Builder for IntegrityTokenRequest
.
Summary
Inherited methods |
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
Builder
public Builder ()
Public methods
setCloudProjectNumber
public abstract IntegrityTokenRequest.Builder setCloudProjectNumber (long cloudProjectNumber)
A cloud project number to link to the integrity token.
This field is required for apps exclusively distributed outside of Google Play and SDKs. For
apps distributed on Google Play, the cloud project number is configured in the Play Console and
need not be set on the request.
Cloud project number can be found in Project info in your Google Cloud Console for the
cloud project where Play Integrity API is enabled.
Calls to
decrypt the token on Google's server must be authenticated using the cloud account that
was linked to the token in this request.
Parameters |
cloudProjectNumber |
long |
setNonce
public abstract IntegrityTokenRequest.Builder setNonce (String nonce)
A nonce to bind the integrity token to.
It must be base64 encoded in web-safe no-wrap form.
See details
about the nonce requirements and recommendations.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-22 UTC."],[],[],null,["# IntegrityTokenRequest.Builder\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nIntegrityTokenRequest.Builder\n=============================\n\n\n`\npublic\nstatic\n\nabstract\nclass\nIntegrityTokenRequest.Builder\n`\n\n\n`\n\nextends `[Object](https://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|----------------------------------------------------------------------|\n| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | com.google.android.play.core.integrity.IntegrityTokenRequest.Builder |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nBuilder for [IntegrityTokenRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.html).\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[Builder](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html#Builder())`() ` |\n\n| ### Public methods ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[IntegrityTokenRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.html) | ` `[build](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html#build())`() ` Builds a [IntegrityTokenRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.html). |\n| ` abstract `[IntegrityTokenRequest.Builder](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html) | ` `[setCloudProjectNumber](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html#setCloudProjectNumber(long))`(long cloudProjectNumber) ` A cloud project number to link to the integrity token. |\n| ` abstract `[IntegrityTokenRequest.Builder](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html) | ` `[setNonce](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html#setNonce(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String.html)` nonce) ` A nonce to bind the integrity token to. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` boolean` | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### Builder\n\n```\npublic Builder ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### build\n\n```\npublic abstract IntegrityTokenRequest build ()\n```\n\nBuilds a [IntegrityTokenRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.html).\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------------------------------------------------------------------------------------------|--------|\n| [IntegrityTokenRequest](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.html) | \u003cbr /\u003e |\n\n### setCloudProjectNumber\n\n```\npublic abstract IntegrityTokenRequest.Builder setCloudProjectNumber (long cloudProjectNumber)\n```\n\nA cloud project number to link to the integrity token.\n\nThis field is required for apps exclusively distributed outside of Google Play and SDKs. For\napps distributed on Google Play, the cloud project number is configured in the Play Console and\nneed not be set on the request.\n\nCloud project number can be found in Project info in your Google Cloud Console for the\ncloud project where Play Integrity API is enabled.\n\nCalls to [decrypt the token on Google's server](https://developer.android.com/google/play/integrity/classic#decrypt-verify-google-servers) must be authenticated using the cloud account that\nwas linked to the token in this request.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------------|---------------|\n| `cloudProjectNumber` | `long` \u003cbr /\u003e |\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|--------|\n| [IntegrityTokenRequest.Builder](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html) | \u003cbr /\u003e |\n\n### setNonce\n\n```\npublic abstract IntegrityTokenRequest.Builder setNonce (String nonce)\n```\n\nA nonce to bind the integrity token to.\n\nIt must be base64 encoded in web-safe no-wrap form.\n\nSee [details](https://developer.android.com/google/play/integrity/classic#nonce) about the nonce requirements and recommendations.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|-----------------|\n| `nonce` | `String` \u003cbr /\u003e |\n\n| Returns ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|--------|\n| [IntegrityTokenRequest.Builder](../../../../../../../reference/com/google/android/play/core/integrity/IntegrityTokenRequest.Builder.html) | \u003cbr /\u003e |"]]