Trying to implement the Calendar Quickstart API into Android but when I declare tokens as demonstrated.
private final String TOKENS_DIRECTORY_PATH = "tokens";
That String is then used in the builder
GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(
HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)
.setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))
.setAccessType("offline")
.build();
But Android returns this error when setting the DataStoreFactory
java.io.IOException: unable to create directory: /tokens
Is there a different method to creating a directory that will work? or must I change the file path of TOKENS_DIRECTORY_PATH
?