googlesamples/android-nearby-cpp

Name: android-nearby-cpp

Owner: Google Samples

Description: Nearby Connections sample using the Play Games C++ SDK

Created: 2015-03-25 00:57:17.0

Updated: 2018-05-23 08:23:27.0

Pushed: 2018-01-26 20:32:48.0

Homepage: https://developers.google.com/games/services/android/nearby

Size: 240

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Google Nearby Connections C++ Samples

Copyright © 2015 Google LLC

Contents

NearbyConnectionsNative: The sample demonstrates real time multiplayer game on C++ Nearby Connection interface SDK.

How to run a sample

For generic play game related instruction, please follow steps described in Getting Started for C++

The build is gradle based. To build from the command line run:

lew assembleDebug

In Android Studio, sometimes the first sync of the project cannot find the Android.mk for gpg-sdk. To fix this open the terminal window in Android Studio and run

lew gpg-sdk:download_and_stage_gpg_sdk

Specific Steps for This App

  1. Build App
  2. Install on phone
  3. Set ONE and ONLY ONE phone/device to be advertising
  4. All other devices to be discovering after advertising is ready (indicator is “stop” button is enabled)
  5. Monitor bottom of the UI for “Connected Clients”; once anyone connected, it should be bigger than 0, “Play Game” should be enabled; from here, you could play it at any time
  6. While playing, your own score and other player's scores should be visible to you at the bottom of the screen note: play time is 30 second by default, and was hard coded as GAME_DURATION in header file

Support

First of all, take a look at our troubleshooting guide. Most setup issues can be solved by following this guide.

If your question is not answered by the troubleshooting guide, we encourage you to post your question to stackoverflow.com. Our team answers questions there reguarly.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.