Skip to content
Browse files
docs: removes reference to deprecated service (Google+) (#1530)
  • Loading branch information
danoscarmike committed Jun 3, 2020
1 parent 9d11712 commit b2572075418dbbb86b9da8901184c72966464520
Showing with 21 additions and 14 deletions.
  1. +19 −9 docs/
  2. +2 −5 docs/
@@ -8,7 +8,7 @@ If you are developing for Android and the Google API you want to use is included
in the [Google Play Services library][play-services], use that library for the
best performance and experience.

To access other Google APIs, use the Google Client Library for Java's
To access other Google APIs, use the Google APIs Client Library for Java's
Android-specific helper classes, which are well-integrated with
[Android AccountManager][account-manager].

@@ -51,19 +51,29 @@ fields are returned to you in the HTTP response. This can significantly reduce
the size of the response, thereby reducing network usage, parsing response time,
and memory usage. It works with both JSON and XML.

The following snippet of code drawn from the Google+ Sample demonstrates how to
use the partial-response protocol:

The following snippet of code drawn from the [Google Drive API Quickstart][quickstart]
demonstrates how to use the partial-response protocol. The `setFields` method
identifies the fields you want returned:

Plus.Activities.List listActivities = plus.activities().list("me", "public");
// Pro tip: Use partial responses to improve response time considerably
ActivityFeed feed = listActivities.execute();
// Print the names and IDs for up to 10 files.
FileList result = service.files().list()
.setFields("nextPageToken, files(id, name)")
List<File> files = result.getFiles();
if (files == null || files.isEmpty()) {
System.out.println("No files found.");
} else {
for (File file : files) {
System.out.printf("%s (%s)\n", file.getName(), file.getId());

@@ -33,14 +33,12 @@ When an error status code is detected in an HTTP response to a Google API that
uses the JSON format, the generated libraries throw a
The errors use the format specified in [Error responses][error-responses].
The following example shows one way that you can handle these exceptions:
Plus.Activities.List listActivities = plus.activities().list("me", "public");
Drive.Files.List listFiles = drive.files.list();
try {
ActivityFeed feed = listActivities.execute();
FileList response = listFiles.execute();
} catch (GoogleJsonResponseException e) {
@@ -49,4 +47,3 @@ try {

0 comments on commit b257207

Please sign in to comment.