java - Specific filename for FileDataStoreFactory (Google API) -
First, if we were using However, Now, we are using However, there is no way for us to now have a specific saved file name. We can only name specific directories. StoredCredential As I have different credential information, I would like to create a group in a single directory. something like this: FileCredentialStore , then we stored the file for the credential information Are able to specify the name.
file credentialstore gets lost
FileDataStoreFactory Are there.
fileDataStorForDistorFactor = new fileDataStoreFactor ("/ Path / to / dir "); Documents & LTs; StoredCredential & gt; datastore = dataStoreFactory.getDataStore ("specific filename"); GoogleAuthorizationCodeFlow Flow = New GoogleAuthorizationCodeFlow.Builder (httpTransport, JSON_FACTORY, Client Sites, Scope) .setCredentialDataStore (Datastore) .build ();
Comments
Post a Comment