requestPlayIntegrityToken method

  1. @override
Future<String?> requestPlayIntegrityToken({
  1. String? cloudProjectNumber,
  2. String? nonce,
  3. String? requestHash,
})
override

Requests a Google Play Integrity Token (Android only).

cloudProjectNumber is the project ID from Google Cloud. nonce is a unique string for the request. requestHash is an optional hash of the request.

Implementation

@override
Future<String?> requestPlayIntegrityToken({
  String? cloudProjectNumber,
  String? nonce,
  String? requestHash,
}) async {
  // Request the integrity token from the native layer
  final String? token =
      await methodChannel.invokeMethod<String>('requestPlayIntegrityToken', {
    'cloudProjectNumber': cloudProjectNumber,
    'nonce': nonce,
    'requestHash': requestHash,
  });
  return token;
}