0

I am using Google Speech API in My Android application and I am taking reference with the sample application provided by Google in docs.

In this sample, there are several lines for the authentication process in App level gradle file.

task copySecretKey(type: Copy) {
def File secretKey = file "$System.env.GOOGLE_APPLICATION_CREDENTIALS"
from secretKey.getParent()
include secretKey.getName()
into 'src/main/res/raw'
rename secretKey.getName(), "credential.json"}
preBuild.dependsOn(copySecretKey)

In this code, I am not getting what is GOOGLE_APPLICATION_CREDENTIALS and where I should paste my JSON.

Thanks in Advance.

Akash Mishra
  • 623
  • 1
  • 6
  • 22

1 Answers1

0

file is the location of your json file. they are just showing you how to use the system variable assuming you have that set to the location of said fule

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449