-
Notifications
You must be signed in to change notification settings - Fork 169
Developer Documentation
The project is using the gradle build system.
Check out project and import it to Android Studio.
local.properties
file is used for storing API keys since it is already ignored in the .gitignore
file.
The file looks like:
sdk.dir=
android_simple_api_access_key_debug=
android_simple_api_access_key=
ip_simple_api_access_key_debug=
ip_simple_api_access_key=
android_backup_key=
play_app_id=
gcm_sender_id=
hub_client_id=
Furthermore, you need to use the settings/debug.keystore
for signing as it is whitelisted for Google Plus Sign-in.
###play_app_id The play app id is used in the Android manifest for
com.google.android.gms.games.APP_ID
com.google.android.gms.appstate.APP_ID
If the key is missing G+ sign-in will not work. This has to come from one of the GDG-X team members after you have signed and submitted the CLA.
###android_simple_api_access_key
This key is used for Google maps (com.google.android.maps.v2.API_KEY) and to initialise the YouTubePlayerSupportFragment
.
Generate your developer key by creating a Cloud Console API project and then going to APIs & auth
and Credentials
. Then Public API access->Create new key->Android Key
.
###ip_simple_api_access_key This key is used to query the G+ API.
If the key is missing most content, like G+ profile images can't be loaded.
In your Cloud Console API project, go to APIs & auth
and Credentials
. Then Public API access->Create new key->Server Key
.
###gcm_sender_id (OPTIONAL) This id is the project id of the GDG[x] Hub.
mGcm.register(BuildConfig.GCM_SENDER_ID)
If the key is missing push notifications are not delivered. This will block the ability to log into the app unless you uncheck the GCM box when doing the initial sign in. Disabling GCM like this is recommended for most contributors.
###android_backup_key (OPTIONAL)
This key is used for the backup key in the Android manifest com.google.android.backup.api_key
.
If the key is missing, application backup after re-install will not work.
You can register for the Android Backup Service to get a key.
###hub_client_id The hub client it is used to get a scoped auth token. This token is send to the hub for GCM.
scope = "audience:server:client_id:" + BuildConfig.HUB_CLIENT_ID
If the key is missing push notifications are not delivered. This has to come from one of the GDG-X team members after you have signed and submitted the CLA.
###Checkstyle Integration
This project enforces a checkstyle. The checkstyle configuration is available in settings/checkstyle.xml
file. Please respect to the configuration.
Note: Because of the line ending difference between Unix systems and Windows, you may get checkstyle errors about line endings. If you do, please check this help page.
If you cannot resolve the issue, you can simply comment out the following line in the checkstyle.xml
file.
<module name="NewlineAtEndOfFile" />
###Image Optimization
Image optimization is encouraged for new images. You can use the image_optim tool to do it easily. Use the following command to install it.
gem install image_optim image_optim_pack
###Debug Build If the Game on Google Play Console is not published, only the registered testers can use the Google+ login in the debug build.
Contact a GDG-X member in Gitter to have your email added to the list of registered Play Games testers for the app.
Event data are received from developers.google.com.
Tagged events are received from the GDG-X Hub server.