people.connections.list
people.get
ListConnectionsResponse response = peopleService.people().connections().list("people/me").execute(); List<Person> connections = response.getConnections();
Person person = peopleService.people().get("resourceName").execute();
getMacAddress()
BluetoothAdapter.getDefaultAdapter().getAddress()
02:00:00:00:00:00
https://maps.googleapis.com/maps/api/place/textsearch/json ?type=airport &location=-33.87,151.21 &radius=5000 &key=<YOUR_API_KEY>
com.android.tools.build:gradle:2.0.0-beta2
GoogleApiClient
// Don’t do it this way! GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this) .addApi(Games.API) .addScope(Plus.SCOPE_PLUS_LOGIN) // The bad part .build(); // Don’t do it this way!
plus.login
// This way you won’t get a consent screen GoogleApiClient gac = new GoogleApiClient.Builder(this, this, this) .addApi(Games.API) .build(); // This way you won’t get a consent screen
.addApi(Games.API, new GamesOptions.Builder() .setRequireGooglePlus(true).build())
Games.getCurrentPlayerId()
Plus.PeopleApi.load
com.google.android.gms.games
tokeninfo
GetServerAuthCode
Games.getGamesServerAuthCode(googleApiClient, “your_server_client_id”)
// Good way { GetServerAuthCodeResult result = Games.getGamesServerAuthCode(gac, clientId).await(); if (result.isSuccess()) { String authCode = result.getCode(); // Send code to server. } } // Good way
www.googleapis.com/games/v1/applications/<app_id>/verify/
"Authorization:OAuth <access_token>"
getGamesServerAuthCode()
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.server_client_id)) .requestEmail() .build();
GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory) // Here is where the audience is set -- checking that it really is your server // based on your Server’s Client ID .setAudience(Arrays.asList(ENTER_YOUR_SERVER_CLIENT_ID_HERE)) // Here is where we verify that Google issued the token .setIssuer("https://accounts.google.com").build(); GoogleIdToken idToken = verifier.verify(idTokenString); if (idToken != null) { Payload payload = idToken.getPayload(); String userId = payload.getSubject(); // You can also access the following properties of the payload in order // for other attributes of the user. Note that these fields are only // available if the user has granted the 'profile' and 'email' OAuth // scopes when requested. Even when requested, some fields may be null. // String email = payload.getEmail(); // boolean emailVerified = Boolean.valueOf(payload.getEmailVerified()); // String name = (String) payload.get("name"); // String pictureUrl = (String) payload.get("picture"); // String locale = (String) payload.get("locale"); // String familyName = (String) payload.get("family_name"); // String givenName = (String) payload.get("given_name");
fetch(url).then(decodeJSON).then(addToPage)...