// Set up the Photos Library Client that interacts with the API
PhotosLibrarySettings settings =
PhotosLibrarySettings.newBuilder()
.setCredentialsProvider(
FixedCredentialsProvider.create(/* Add credentials here.
*/))
.build();
try (PhotosLibraryClient photosLibraryClient =
PhotosLibraryClient.initialize(settings)) {
// Create a new Album with at title
Album createdAlbum = photosLibraryClient.createAlbum("My
Album");
// Get some properties from the album, such as its ID and
product URL
String id = album.getId();
String url = album.getProductUrl();
} catch (ApiException e) {
// Error during album creation
}
所以我的问题是如何在这个参数上传递凭据?(我想在本机 android 上使用它而不是 web 应用程序或后端服务器)我真的很挣扎,让谷歌登录工作虽然如果我可以使用它来获取凭据会很棒:)
任何帮助表示赞赏!