In Android Studio, I'm trying to send a request to a Google spreadsheet. To do this, I use sample code from Java Quickstart in the official Google Sheets API documentation. But there is a problem - the code cannot find the credentials.json file.
There is a way:
private static final String CREDENTIALS_FILE_PATH = "/credentials.json";
And there are two ways to get this file, both of which do not find anything and as a result, in in it turns out to be NULL:
InputStream in = new FileInputStream(CREDENTIALS_FILE_PATH); //InputStream in = GoogleSheets.class.getResourceAsStream(CREDENTIALS_FILE_PATH);
Tell me, please, how to solve this problem?