- Устанавливаем библиботеку
Secrets Gradle Plugin for Android
- Добавляем в
build.gradle
библиотеку// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { ... id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false }
- Добавляем в
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Приветствие и регистрация: | |
Клиент: {action: "register", nickname: "Anna"} | |
Сервер: {status: "error", error_id: 101, error_desc: "Nickname alredy occupied"} | |
Сервер: {status: "error", error_id: 1, error_desc: "Internal server error"} | |
Вступление в игру: | |
Клиент: {action: "join", opponent_id:10005} | |
Сервер: {status: "error", error_id: 201, error_desc: "No available user with id 10005"} | |
Получение статуса с сервера |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Приветствие и регистрация: | |
Клиент: {action: "register", nickname: "Anna"} | |
Сервер: {status: "ok", id:231} | |
Получение списка пользователей (после успешной регистрации): | |
Клиент: {action: "fetch_users"} | |
Сервер: {status: "ok", users:[{id:40, nickname:"Alex"}, {id:105, nickname:"Ckopo"}]} | |
Вступление в игру: | |
Клиент: {action: "join", opponent_id:105} | |
Сервер: {status: "ok", data: {heaps:[10, 5, 2], your_turn: false}} | |
Получение статуса с сервера |