1

How do we get reference to service object in the java example?

https://developers.google.com/glass/v1/reference/timeline/attachments/list

1 Answer 1

2

From the quickstart sample code at https://github.com/googleglass/mirror-quickstart-java (and, in particular https://github.com/googleglass/mirror-quickstart-java/blob/master/src/main/java/com/google/glassware/MirrorClient.java) you can get a Mirror object through the builder using code like

public static Mirror getMirror(Credential credential) {
  return new Mirror.Builder(new NetHttpTransport(), new JacksonFactory(), credential)
      .setApplicationName("PG Java Starter").build();
}

See also the JavaDoc at https://developers.google.com/resources/api-libraries/documentation/mirror/v1/java/latest/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.