Google has introduced Play Integrity for device verification.
It uses nonce as an input string. There is no sample on how to generate nonce. There are few blogs like these but there is no example for that can works at production level.
Google has introduced Play Integrity for device verification.
It uses nonce as an input string. There is no sample on how to generate nonce. There are few blogs like these but there is no example for that can works at production level.
Answering my own question: Generate Nonce like this
var nonceBytes = ByteArray(40) //you can change the length
SecureRandom().nextBytes(nonceBytes) //randomise the bytes
var nonce = Base64.encodeToString(nonceBytes, Base64.URL_SAFE)
Hope this helps.