我们如何在java示例中引用服务对象?
https://developers.google.com/glass/v1/reference/timeline/attachments/list
答案 0 :(得分:2)
从https://github.com/googleglass/mirror-quickstart-java(特别是https://github.com/googleglass/mirror-quickstart-java/blob/master/src/main/java/com/google/glassware/MirrorClient.java)的快速入门示例代码中,您可以使用
等代码通过构建器获取Mirror对象public static Mirror getMirror(Credential credential) {
return new Mirror.Builder(new NetHttpTransport(), new JacksonFactory(), credential)
.setApplicationName("PG Java Starter").build();
}
另见JavaDoc at https://developers.google.com/resources/api-libraries/documentation/mirror/v1/java/latest/