main funcions fixes
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -5,4 +5,5 @@
|
||||
.idea/
|
||||
.vscode/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.pyc
|
||||
.fake
|
||||
479
TECHNICAL_SPECIFICATION_ANDROID.md
Normal file
479
TECHNICAL_SPECIFICATION_ANDROID.md
Normal file
@@ -0,0 +1,479 @@
|
||||
# Техническое задание и промпт для создания Android приложения GodEye Signal Center
|
||||
|
||||
## 🎯 ТЕХНИЧЕСКОЕ ЗАДАНИЕ
|
||||
|
||||
### Назначение системы
|
||||
Создать Android приложение для системы удаленного доступа к камерам смартфона "GodEye Signal Center". Приложение должно предоставлять операторам доступ к камерам устройства через WebRTC с возможностью переключения между различными типами камер.
|
||||
|
||||
### Архитектура системы
|
||||
```
|
||||
[Android App] ←→ [WebSocket/Socket.IO] ←→ [Backend Server] ←→ [Desktop Operator]
|
||||
←→ [WebRTC P2P Connection] ←→ [Desktop Operator]
|
||||
```
|
||||
|
||||
### Основные компоненты
|
||||
1. **MainActivity** - главный экран с управлением подключением
|
||||
2. **SocketService** - сервис для WebSocket соединения с backend
|
||||
3. **CameraManager** - управление камерами устройства (Camera2 API)
|
||||
4. **WebRTCManager** - обработка WebRTC соединений для видеопотока
|
||||
5. **PermissionManager** - управление разрешениями приложения
|
||||
6. **SessionManager** - управление активными сессиями с операторами
|
||||
|
||||
### Функциональные требования
|
||||
- ✅ Подключение к backend серверу по WebSocket (Socket.IO)
|
||||
- ✅ Регистрация устройства с передачей характеристик
|
||||
- ✅ Получение и обработка запросов доступа к камере от операторов
|
||||
- ✅ Диалоги согласия пользователя на доступ к камере
|
||||
- ✅ WebRTC соединение для передачи видеопотока
|
||||
- ✅ Переключение между камерами: основная, фронтальная, широкоугольная, телеобъектив
|
||||
- ✅ Отображение активных сессий и их управление
|
||||
- ✅ Автоматическое переподключение при обрыве соединения
|
||||
- ✅ Работа в фоне (Foreground Service)
|
||||
- ✅ Уведомления о статусе подключения
|
||||
|
||||
### Технические требования
|
||||
- **Платформа**: Android API 24+ (Android 7.0+)
|
||||
- **Язык**: Kotlin
|
||||
- **Архитектура**: MVVM с LiveData
|
||||
- **Сеть**: Socket.IO для сигнализации, WebRTC для медиа
|
||||
- **Камера**: Camera2 API для работы с камерами
|
||||
- **UI**: Material Design 3
|
||||
- **Разрешения**: CAMERA, RECORD_AUDIO, INTERNET, FOREGROUND_SERVICE
|
||||
|
||||
## 📋 ПОЛНЫЙ ПРОМПТ ДЛЯ COPILOT
|
||||
|
||||
---
|
||||
|
||||
**Создай полное Android приложение на Kotlin для системы GodEye Signal Center со следующими требованиями:**
|
||||
|
||||
### 🚀 ОСНОВНАЯ ЗАДАЧА
|
||||
Разработать Android приложение, которое подключается к backend серверу, получает запросы от операторов на доступ к камере устройства и предоставляет видеопоток через WebRTC с возможностью переключения между камерами.
|
||||
|
||||
### 📱 СТРУКТУРА ПРОЕКТА
|
||||
```
|
||||
app/
|
||||
├── src/main/
|
||||
│ ├── java/com/godeye/android/
|
||||
│ │ ├── MainActivity.kt
|
||||
│ │ ├── services/
|
||||
│ │ │ ├── SocketService.kt
|
||||
│ │ │ └── CameraService.kt
|
||||
│ │ ├── managers/
|
||||
│ │ │ ├── CameraManager.kt
|
||||
│ │ │ ├── WebRTCManager.kt
|
||||
│ │ │ ├── SessionManager.kt
|
||||
│ │ │ └── PermissionManager.kt
|
||||
│ │ ├── models/
|
||||
│ │ │ ├── DeviceInfo.kt
|
||||
│ │ │ ├── CameraSession.kt
|
||||
│ │ │ └── SocketEvents.kt
|
||||
│ │ ├── ui/
|
||||
│ │ │ ├── dialogs/
|
||||
│ │ │ │ └── CameraRequestDialog.kt
|
||||
│ │ │ └── adapters/
|
||||
│ │ │ └── SessionAdapter.kt
|
||||
│ │ └── utils/
|
||||
│ │ ├── Constants.kt
|
||||
│ │ └── Extensions.kt
|
||||
│ ├── res/
|
||||
│ │ ├── layout/
|
||||
│ │ │ ├── activity_main.xml
|
||||
│ │ │ ├── dialog_camera_request.xml
|
||||
│ │ │ └── item_session.xml
|
||||
│ │ ├── values/
|
||||
│ │ │ ├── strings.xml
|
||||
│ │ │ ├── colors.xml
|
||||
│ │ │ └── themes.xml
|
||||
│ │ └── drawable/
|
||||
│ └── AndroidManifest.xml
|
||||
└── build.gradle (app)
|
||||
```
|
||||
|
||||
### 🔧 BACKEND API ENDPOINTS
|
||||
|
||||
#### WebSocket События (Socket.IO на порту 3001):
|
||||
```kotlin
|
||||
// Регистрация устройства
|
||||
socket.emit("register:android", JsonObject().apply {
|
||||
addProperty("deviceId", deviceId)
|
||||
add("deviceInfo", JsonObject().apply {
|
||||
addProperty("model", Build.MODEL)
|
||||
addProperty("androidVersion", Build.VERSION.RELEASE)
|
||||
addProperty("appVersion", "1.0.0")
|
||||
add("availableCameras", JsonArray().apply {
|
||||
add("back"); add("front"); add("wide"); add("telephoto")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
// Обработка входящих событий
|
||||
socket.on("register:success") { /* успешная регистрация */ }
|
||||
socket.on("camera:request") { /* запрос доступа к камере */ }
|
||||
socket.on("camera:disconnect") { /* завершение сессии */ }
|
||||
socket.on("camera:switch") { /* переключение камеры */ }
|
||||
socket.on("webrtc:offer") { /* WebRTC offer от оператора */ }
|
||||
socket.on("webrtc:ice-candidate") { /* ICE candidates */ }
|
||||
|
||||
// Отправка ответов
|
||||
socket.emit("camera:response", JsonObject().apply {
|
||||
addProperty("sessionId", sessionId)
|
||||
addProperty("accepted", true)
|
||||
})
|
||||
socket.emit("webrtc:answer", JsonObject().apply {
|
||||
addProperty("sessionId", sessionId)
|
||||
add("answer", /* RTCSessionDescription */)
|
||||
})
|
||||
```
|
||||
|
||||
### 🎨 UI/UX ТРЕБОВАНИЯ
|
||||
|
||||
#### MainActivity.xml:
|
||||
```xml
|
||||
<!-- Основной экран с полями: -->
|
||||
- TextView: Device ID (автогенерируемый)
|
||||
- EditText: Server URL (по умолчанию: http://192.168.1.100:3001)
|
||||
- TextView: Connection Status
|
||||
- Button: Connect/Disconnect
|
||||
- RecyclerView: Active Sessions
|
||||
- ProgressBar: Connection progress
|
||||
- FloatingActionButton: Settings
|
||||
```
|
||||
|
||||
#### CameraRequestDialog.xml:
|
||||
```xml
|
||||
<!-- Диалог запроса доступа: -->
|
||||
- ImageView: Operator avatar/icon
|
||||
- TextView: "Оператор {operatorId} запрашивает доступ к камере {cameraType}"
|
||||
- TextView: Session ID
|
||||
- Button: "Разрешить" / "Отклонить"
|
||||
- CheckBox: "Запомнить для этого оператора"
|
||||
```
|
||||
|
||||
### 💾 DATA MODELS
|
||||
|
||||
```kotlin
|
||||
data class DeviceInfo(
|
||||
val model: String,
|
||||
val androidVersion: String,
|
||||
val appVersion: String,
|
||||
val availableCameras: List<String>
|
||||
)
|
||||
|
||||
data class CameraSession(
|
||||
val sessionId: String,
|
||||
val operatorId: String,
|
||||
val cameraType: String,
|
||||
val startTime: Long,
|
||||
var isActive: Boolean = true,
|
||||
var webRTCConnected: Boolean = false
|
||||
)
|
||||
|
||||
sealed class SocketEvent {
|
||||
data class RegisterAndroid(val deviceId: String, val deviceInfo: DeviceInfo) : SocketEvent()
|
||||
data class CameraRequest(val sessionId: String, val operatorId: String, val cameraType: String) : SocketEvent()
|
||||
data class CameraResponse(val sessionId: String, val accepted: Boolean) : SocketEvent()
|
||||
data class WebRTCOffer(val sessionId: String, val offer: String) : SocketEvent()
|
||||
data class WebRTCAnswer(val sessionId: String, val answer: String) : SocketEvent()
|
||||
}
|
||||
```
|
||||
|
||||
### 🔐 РАЗРЕШЕНИЯ (AndroidManifest.xml):
|
||||
```xml
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" android:required="true" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-feature android:name="android.hardware.microphone" android:required="true" />
|
||||
```
|
||||
|
||||
### 📚 DEPENDENCIES (build.gradle):
|
||||
```gradle
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.12.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'com.google.android.material:material:1.11.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
|
||||
implementation 'androidx.activity:activity-ktx:1.8.2'
|
||||
|
||||
// Socket.IO для WebSocket соединения
|
||||
implementation 'io.socket:socket.io-client:2.1.0'
|
||||
|
||||
// WebRTC для видеопотока
|
||||
implementation 'org.webrtc:google-webrtc:1.0.32006'
|
||||
|
||||
// Camera2 API
|
||||
implementation 'androidx.camera:camera-core:1.3.1'
|
||||
implementation 'androidx.camera:camera-camera2:1.3.1'
|
||||
implementation 'androidx.camera:camera-lifecycle:1.3.1'
|
||||
implementation 'androidx.camera:camera-view:1.3.1'
|
||||
|
||||
// JSON парсинг
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
// Корутины
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
||||
|
||||
// RecyclerView
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||||
|
||||
// Work Manager для фоновых задач
|
||||
implementation 'androidx.work:work-runtime-ktx:2.9.0'
|
||||
}
|
||||
```
|
||||
|
||||
### 🏗️ ОСНОВНЫЕ КЛАССЫ
|
||||
|
||||
#### 1. MainActivity.kt - Основная логика:
|
||||
```kotlin
|
||||
class MainActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var socketService: SocketService
|
||||
private lateinit var sessionAdapter: SessionAdapter
|
||||
private val viewModel: MainViewModel by viewModels()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// Инициализация UI
|
||||
// Проверка разрешений
|
||||
// Настройка RecyclerView для сессий
|
||||
// Подключение к SocketService
|
||||
}
|
||||
|
||||
private fun connectToServer() {
|
||||
val serverUrl = binding.etServerUrl.text.toString()
|
||||
socketService.connect(serverUrl)
|
||||
}
|
||||
|
||||
private fun showCameraRequestDialog(request: CameraRequest) {
|
||||
CameraRequestDialog.newInstance(request).show(supportFragmentManager, "camera_request")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 2. SocketService.kt - WebSocket соединение:
|
||||
```kotlin
|
||||
class SocketService : Service() {
|
||||
private lateinit var socket: Socket
|
||||
private val binder = LocalBinder()
|
||||
|
||||
fun connect(serverUrl: String) {
|
||||
socket = IO.socket(serverUrl)
|
||||
socket.connect()
|
||||
registerDevice()
|
||||
setupEventListeners()
|
||||
}
|
||||
|
||||
private fun registerDevice() {
|
||||
val deviceInfo = DeviceInfo(
|
||||
model = Build.MODEL,
|
||||
androidVersion = Build.VERSION.RELEASE,
|
||||
appVersion = BuildConfig.VERSION_NAME,
|
||||
availableCameras = CameraManager.getAvailableCameraTypes()
|
||||
)
|
||||
socket.emit("register:android", gson.toJson(RegisterAndroid(deviceId, deviceInfo)))
|
||||
}
|
||||
|
||||
private fun setupEventListeners() {
|
||||
socket.on("camera:request") { args ->
|
||||
val request = gson.fromJson(args[0].toString(), CameraRequest::class.java)
|
||||
// Отправить broadcast для показа диалога
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 3. CameraManager.kt - Управление камерами:
|
||||
```kotlin
|
||||
class CameraManager(private val context: Context) {
|
||||
private val cameraManager = context.getSystemService(Context.CAMERA_SERVICE) as android.hardware.camera2.CameraManager
|
||||
private var currentCameraId: String? = null
|
||||
private var captureSession: CameraCaptureSession? = null
|
||||
|
||||
fun getAvailableCameraTypes(): List<String> {
|
||||
val cameras = mutableListOf<String>()
|
||||
try {
|
||||
for (cameraId in cameraManager.cameraIdList) {
|
||||
val characteristics = cameraManager.getCameraCharacteristics(cameraId)
|
||||
val facing = characteristics.get(CameraCharacteristics.LENS_FACING)
|
||||
when (facing) {
|
||||
CameraCharacteristics.LENS_FACING_BACK -> cameras.add("back")
|
||||
CameraCharacteristics.LENS_FACING_FRONT -> cameras.add("front")
|
||||
}
|
||||
// Проверка на wide и telephoto
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e("CameraManager", "Error getting cameras", e)
|
||||
}
|
||||
return cameras
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
fun startCamera(cameraType: String, surface: Surface) {
|
||||
val cameraId = getCameraIdForType(cameraType) ?: return
|
||||
cameraManager.openCamera(cameraId, cameraStateCallback, null)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 4. WebRTCManager.kt - WebRTC соединения:
|
||||
```kotlin
|
||||
class WebRTCManager(private val context: Context) {
|
||||
private lateinit var peerConnectionFactory: PeerConnectionFactory
|
||||
private var peerConnection: RTCPeerConnection? = null
|
||||
private var localVideoSource: VideoSource? = null
|
||||
|
||||
fun initialize() {
|
||||
val initializationOptions = PeerConnectionFactory.InitializationOptions.builder(context)
|
||||
.setEnableInternalTracer(false)
|
||||
.createInitializationOptions()
|
||||
PeerConnectionFactory.initialize(initializationOptions)
|
||||
|
||||
val options = PeerConnectionFactory.Options()
|
||||
peerConnectionFactory = PeerConnectionFactory.builder()
|
||||
.setOptions(options)
|
||||
.createPeerConnectionFactory()
|
||||
}
|
||||
|
||||
fun createOffer(sessionId: String) {
|
||||
val mediaConstraints = MediaConstraints()
|
||||
peerConnection?.createOffer(object : SdpObserver {
|
||||
override fun onCreateSuccess(sessionDescription: SessionDescription) {
|
||||
// Отправить offer через WebSocket
|
||||
}
|
||||
}, mediaConstraints)
|
||||
}
|
||||
|
||||
fun handleAnswer(sessionId: String, answer: SessionDescription) {
|
||||
peerConnection?.setRemoteDescription(SimpleSdpObserver(), answer)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 🔄 WORKFLOW ПРИЛОЖЕНИЯ
|
||||
|
||||
1. **Запуск приложения:**
|
||||
- Проверка разрешений (CAMERA, AUDIO, INTERNET)
|
||||
- Генерация уникального Device ID
|
||||
- Определение доступных камер устройства
|
||||
- Инициализация WebRTC
|
||||
|
||||
2. **Подключение к серверу:**
|
||||
- Подключение Socket.IO к указанному URL
|
||||
- Регистрация устройства с отправкой характеристик
|
||||
- Ожидание подтверждения регистрации
|
||||
- Запуск Foreground Service для фоновой работы
|
||||
|
||||
3. **Обработка запроса камеры:**
|
||||
- Получение события "camera:request" от сервера
|
||||
- Показ диалога пользователю с информацией об операторе
|
||||
- При согласии - отправка "camera:response" с accepted: true
|
||||
- Инициализация WebRTC соединения
|
||||
|
||||
4. **WebRTC соединение:**
|
||||
- Создание RTCPeerConnection
|
||||
- Настройка локального видеопотока с указанной камеры
|
||||
- Обмен offer/answer/ice-candidates с оператором
|
||||
- Начало передачи видеопотока
|
||||
|
||||
5. **Управление сессией:**
|
||||
- Отображение активных сессий в RecyclerView
|
||||
- Обработка команд переключения камеры
|
||||
- Завершение сессии по команде оператора или пользователя
|
||||
- Очистка ресурсов WebRTC
|
||||
|
||||
### ⚙️ НАСТРОЙКИ И КОНФИГУРАЦИЯ
|
||||
|
||||
#### SharedPreferences ключи:
|
||||
```kotlin
|
||||
object PreferenceKeys {
|
||||
const val SERVER_URL = "server_url"
|
||||
const val DEVICE_ID = "device_id"
|
||||
const val AUTO_ACCEPT_REQUESTS = "auto_accept_requests"
|
||||
const val CAMERA_QUALITY = "camera_quality"
|
||||
const val NOTIFICATION_ENABLED = "notification_enabled"
|
||||
}
|
||||
```
|
||||
|
||||
#### Настройки WebRTC:
|
||||
```kotlin
|
||||
val iceServers = listOf(
|
||||
RTCIceServer.builder("stun:stun.l.google.com:19302").build(),
|
||||
RTCIceServer.builder("stun:stun1.l.google.com:19302").build()
|
||||
)
|
||||
|
||||
val rtcConfig = RTCConfiguration(iceServers).apply {
|
||||
tcpCandidatePolicy = RTCConfiguration.TcpCandidatePolicy.DISABLED
|
||||
bundlePolicy = RTCConfiguration.BundlePolicy.MAXBUNDLE
|
||||
rtcpMuxPolicy = RTCConfiguration.RtcpMuxPolicy.REQUIRE
|
||||
}
|
||||
```
|
||||
|
||||
### 🐛 ОБРАБОТКА ОШИБОК
|
||||
|
||||
```kotlin
|
||||
sealed class AppError {
|
||||
object NetworkError : AppError()
|
||||
object CameraPermissionDenied : AppError()
|
||||
object CameraNotAvailable : AppError()
|
||||
object WebRTCConnectionFailed : AppError()
|
||||
data class SocketError(val message: String) : AppError()
|
||||
data class UnknownError(val throwable: Throwable) : AppError()
|
||||
}
|
||||
|
||||
class ErrorHandler {
|
||||
fun handleError(error: AppError, context: Context) {
|
||||
when (error) {
|
||||
is AppError.NetworkError -> showNetworkError(context)
|
||||
is AppError.CameraPermissionDenied -> showPermissionDialog(context)
|
||||
is AppError.WebRTCConnectionFailed -> restartWebRTC()
|
||||
// и т.д.
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 📋 ТЕСТИРОВАНИЕ
|
||||
|
||||
1. **Запуск backend сервера**: `cd backend && node src/server.js`
|
||||
2. **Веб-демо оператора**: `http://localhost:3001`
|
||||
3. **Подключение Android**: указать URL `http://192.168.1.100:3001`
|
||||
4. **Тестовые сценарии**:
|
||||
- Регистрация устройства
|
||||
- Запрос доступа к камере от веб-демо
|
||||
- Переключение между камерами
|
||||
- Разрыв и восстановление соединения
|
||||
|
||||
### 🚀 ФИНАЛЬНЫЕ ТРЕБОВАНИЯ
|
||||
|
||||
**Создай полный рабочий проект со всеми перечисленными файлами, который:**
|
||||
- ✅ Компилируется без ошибок на API 24+
|
||||
- ✅ Корректно подключается к backend серверу
|
||||
- ✅ Отображает запросы операторов в диалогах
|
||||
- ✅ Передает видеопоток через WebRTC
|
||||
- ✅ Поддерживает переключение камер
|
||||
- ✅ Работает в фоне с уведомлениями
|
||||
- ✅ Имеет современный Material Design UI
|
||||
- ✅ Обрабатывает все ошибки и исключения
|
||||
|
||||
**Backend server URL для тестирования**: `http://localhost:3001` или `http://192.168.1.100:3001`
|
||||
|
||||
---
|
||||
|
||||
### 📝 ДОПОЛНИТЕЛЬНЫЕ ПРИМЕЧАНИЯ
|
||||
|
||||
- Используй современный Kotlin синтаксис с корутинами
|
||||
- Применяй MVVM архитектуру с LiveData/StateFlow
|
||||
- Все строки выноси в strings.xml с поддержкой русского языка
|
||||
- Добавь логирование всех важных событий
|
||||
- Используй Material Design 3 компоненты
|
||||
- Обеспечь backward compatibility с API 24
|
||||
- Добавь комментарии к сложной логике WebRTC и Camera2
|
||||
|
||||
**Этот промпт содержит все необходимые технические детали для создания полнофункционального Android приложения GodEye Signal Center!**
|
||||
Binary file not shown.
BIN
android-client/.gradle/7.2/fileHashes/fileHashes.lock
Normal file
BIN
android-client/.gradle/7.2/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
0
android-client/.gradle/7.2/gc.properties
Normal file
0
android-client/.gradle/7.2/gc.properties
Normal file
BIN
android-client/.gradle/7.5/checksums/checksums.lock
Normal file
BIN
android-client/.gradle/7.5/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
android-client/.gradle/7.5/checksums/md5-checksums.bin
Normal file
BIN
android-client/.gradle/7.5/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
android-client/.gradle/7.5/checksums/sha1-checksums.bin
Normal file
BIN
android-client/.gradle/7.5/checksums/sha1-checksums.bin
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
android-client/.gradle/7.5/fileChanges/last-build.bin
Normal file
BIN
android-client/.gradle/7.5/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
android-client/.gradle/7.5/fileHashes/fileHashes.lock
Normal file
BIN
android-client/.gradle/7.5/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
0
android-client/.gradle/7.5/gc.properties
Normal file
0
android-client/.gradle/7.5/gc.properties
Normal file
BIN
android-client/.gradle/8.0/checksums/checksums.lock
Normal file
BIN
android-client/.gradle/8.0/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
android-client/.gradle/8.0/checksums/md5-checksums.bin
Normal file
BIN
android-client/.gradle/8.0/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
android-client/.gradle/8.0/checksums/sha1-checksums.bin
Normal file
BIN
android-client/.gradle/8.0/checksums/sha1-checksums.bin
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
android-client/.gradle/8.0/fileChanges/last-build.bin
Normal file
BIN
android-client/.gradle/8.0/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
android-client/.gradle/8.0/fileHashes/fileHashes.lock
Normal file
BIN
android-client/.gradle/8.0/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
0
android-client/.gradle/8.0/gc.properties
Normal file
0
android-client/.gradle/8.0/gc.properties
Normal file
BIN
android-client/.gradle/8.5/checksums/checksums.lock
Normal file
BIN
android-client/.gradle/8.5/checksums/checksums.lock
Normal file
Binary file not shown.
BIN
android-client/.gradle/8.5/checksums/md5-checksums.bin
Normal file
BIN
android-client/.gradle/8.5/checksums/md5-checksums.bin
Normal file
Binary file not shown.
BIN
android-client/.gradle/8.5/checksums/sha1-checksums.bin
Normal file
BIN
android-client/.gradle/8.5/checksums/sha1-checksums.bin
Normal file
Binary file not shown.
Binary file not shown.
BIN
android-client/.gradle/8.5/fileChanges/last-build.bin
Normal file
BIN
android-client/.gradle/8.5/fileChanges/last-build.bin
Normal file
Binary file not shown.
BIN
android-client/.gradle/8.5/fileHashes/fileHashes.lock
Normal file
BIN
android-client/.gradle/8.5/fileHashes/fileHashes.lock
Normal file
Binary file not shown.
0
android-client/.gradle/8.5/gc.properties
Normal file
0
android-client/.gradle/8.5/gc.properties
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
#Sun Sep 28 22:04:42 KST 2025
|
||||
gradle.version=9.0-milestone-1
|
||||
#Mon Sep 29 19:45:19 KST 2025
|
||||
gradle.version=7.2
|
||||
|
||||
Binary file not shown.
BIN
android-client/.gradle/checksums/checksums.lock
Normal file
BIN
android-client/.gradle/checksums/checksums.lock
Normal file
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
#Sun Sep 28 22:05:42 KST 2025
|
||||
java.home=/snap/android-studio/205/jbr
|
||||
@@ -1,9 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="app" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="com.godeye.android.MainActivity" />
|
||||
<module name="android-client" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
20
android-client/GodEye_Android_Client.iml
Normal file
20
android-client/GodEye_Android_Client.iml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id=":" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="java-gradle" name="Java-Gradle">
|
||||
<configuration>
|
||||
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
|
||||
<option name="BUILDABLE" value="false" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
127
android-client/README.md
Normal file
127
android-client/README.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# GodEye Android Client - Setup Instructions
|
||||
|
||||
## Требования для разработки
|
||||
|
||||
### 1. Android SDK
|
||||
- Android SDK Platform-tools
|
||||
- Android SDK Build-tools 34.0.0
|
||||
- Android 14 (API 34) Platform
|
||||
- Android Emulator
|
||||
|
||||
### 2. Java Development Kit
|
||||
- JDK 8 или выше
|
||||
|
||||
## Настройка эмулятора
|
||||
|
||||
### Создание AVD (Android Virtual Device)
|
||||
```bash
|
||||
# Создать эмулятор Android 14 с Google APIs
|
||||
avdmanager create avd -n "GodEye_Emulator" -k "system-images;android-34;google_apis;x86_64" -d "pixel_4"
|
||||
|
||||
# Запуск эмулятора
|
||||
emulator -avd GodEye_Emulator -no-snapshot-save
|
||||
```
|
||||
|
||||
### Альтернативно через Android Studio:
|
||||
1. Tools → AVD Manager
|
||||
2. Create Virtual Device
|
||||
3. Choose Pixel 4 или подобное устройство
|
||||
4. Select Android 14 (API 34) system image
|
||||
5. Name: "GodEye_Emulator"
|
||||
|
||||
## Команды сборки
|
||||
|
||||
### Сборка проекта
|
||||
```bash
|
||||
# Debug версия
|
||||
./gradlew assembleDebug
|
||||
|
||||
# Release версия
|
||||
./gradlew assembleRelease
|
||||
|
||||
# Установка на эмулятор/устройство
|
||||
./gradlew installDebug
|
||||
|
||||
# Запуск тестов
|
||||
./gradlew test
|
||||
```
|
||||
|
||||
### Установка APK
|
||||
```bash
|
||||
# Найти собранный APK
|
||||
ls app/build/outputs/apk/debug/
|
||||
|
||||
# Установить через adb
|
||||
adb install app/build/outputs/apk/debug/app-debug.apk
|
||||
|
||||
# Или напрямую
|
||||
./gradlew installDebug
|
||||
```
|
||||
|
||||
## Настройки IDE
|
||||
|
||||
### Android Studio
|
||||
1. Open Project → выбрать папку `/android-client`
|
||||
2. File → Project Structure → Project SDK: Android API 34
|
||||
3. Build → Make Project
|
||||
4. Run → Run 'app'
|
||||
|
||||
### IntelliJ IDEA
|
||||
1. New → Project from Existing Sources
|
||||
2. Import as Gradle project
|
||||
3. SDK Location: установить путь к Android SDK
|
||||
4. Gradle JVM: JDK 8+
|
||||
|
||||
## Отладка
|
||||
|
||||
### ADB команды
|
||||
```bash
|
||||
# Просмотр логов приложения
|
||||
adb logcat | grep "GodEye\|SocketManager\|CameraManager"
|
||||
|
||||
# Просмотр устройств
|
||||
adb devices
|
||||
|
||||
# Перенаправление портов для локального сервера
|
||||
adb reverse tcp:3001 tcp:3001
|
||||
```
|
||||
|
||||
### Настройка сети для эмулятора
|
||||
- Localhost backend: `http://10.0.2.2:3001`
|
||||
- Внешний сервер: `http://YOUR_IP:3001`
|
||||
|
||||
## Структура проекта
|
||||
|
||||
```
|
||||
android-client/
|
||||
├── app/
|
||||
│ ├── src/main/
|
||||
│ │ ├── java/com/godeye/android/
|
||||
│ │ │ ├── MainActivity.kt
|
||||
│ │ │ ├── network/SocketManager.kt
|
||||
│ │ │ └── camera/CameraManager.kt
|
||||
│ │ ├── res/layout/activity_main.xml
|
||||
│ │ └── AndroidManifest.xml
|
||||
│ └── build.gradle
|
||||
├── gradle/wrapper/
|
||||
├── gradlew
|
||||
└── settings.gradle
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Проблемы с правами
|
||||
```bash
|
||||
chmod +x gradlew
|
||||
```
|
||||
|
||||
### Проблемы с SDK
|
||||
```bash
|
||||
export ANDROID_HOME=/path/to/android/sdk
|
||||
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
|
||||
```
|
||||
|
||||
### Проблемы с сетью в эмуляторе
|
||||
- Убедиться что backend сервер запущен на порту 3001
|
||||
- Использовать `10.0.2.2` вместо `localhost` в эмуляторе
|
||||
- Проверить правила firewall
|
||||
62
android-client/app/app.iml
Normal file
62
android-client/app/app.iml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android-gradle" name="Android-Gradle">
|
||||
<configuration>
|
||||
<option name="GRADLE_PROJECT_PATH" value=":app" />
|
||||
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="7.2.2" />
|
||||
<option name="LAST_KNOWN_AGP_VERSION" value="7.2.2" />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
||||
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="kotlin-language" name="Kotlin">
|
||||
<configuration version="5" platform="JVM 1.8" allPlatforms="JVM [1.8]" useProjectSettings="false">
|
||||
<compilerSettings>
|
||||
<option name="additionalArguments" value="-java-parameters" />
|
||||
</compilerSettings>
|
||||
<compilerArguments>
|
||||
<stringArguments>
|
||||
<stringArg name="jvmTarget" arg="1.8" />
|
||||
</stringArguments>
|
||||
</compilerArguments>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 32 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="Gradle: androidx.core:core-ktx:1.8.0@aar" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: androidx.appcompat:appcompat:1.5.0@aar" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: com.google.android.material:material:1.6.1@aar" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: androidx.constraintlayout:constraintlayout:2.1.4@aar" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,10 +1,7 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
namespace 'com.godeye.android'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
@@ -25,12 +22,12 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
jvmTarget = '21'
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
@@ -42,25 +39,28 @@ android {
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.12.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'com.google.android.material:material:1.10.0'
|
||||
implementation 'com.google.android.material:material:1.11.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
||||
|
||||
|
||||
// Socket.IO for WebSocket communication
|
||||
implementation 'io.socket:socket.io-client:2.1.0'
|
||||
|
||||
// WebRTC
|
||||
implementation 'org.webrtc:google-webrtc:1.0.32006'
|
||||
|
||||
// Socket.IO
|
||||
implementation 'io.socket:socket.io-client:2.1.0'
|
||||
|
||||
// Camera
|
||||
implementation 'androidx.camera:camera-core:1.3.0'
|
||||
implementation 'androidx.camera:camera-camera2:1.3.0'
|
||||
implementation 'androidx.camera:camera-lifecycle:1.3.0'
|
||||
implementation 'androidx.camera:camera-view:1.3.0'
|
||||
|
||||
// JSON
|
||||
|
||||
// Camera support
|
||||
implementation 'androidx.camera:camera-core:1.3.1'
|
||||
implementation 'androidx.camera:camera-camera2:1.3.1'
|
||||
implementation 'androidx.camera:camera-lifecycle:1.3.1'
|
||||
implementation 'androidx.camera:camera-view:1.3.1'
|
||||
|
||||
// JSON parsing
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
|
||||
// Coroutines
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
||||
|
||||
// Testing
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
|
||||
@@ -4,253 +4,134 @@ import android.Manifest
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.widget.Toast
|
||||
import android.widget.*
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.godeye.android.camera.CameraManager
|
||||
import com.godeye.android.databinding.ActivityMainBinding
|
||||
import com.godeye.android.network.SocketManager
|
||||
import com.godeye.android.webrtc.WebRTCManager
|
||||
import org.webrtc.EglBase
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.*
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var socketManager: SocketManager
|
||||
private lateinit var cameraManager: CameraManager
|
||||
private lateinit var webRTCManager: WebRTCManager
|
||||
private lateinit var eglBase: EglBase
|
||||
|
||||
private val deviceId by lazy {
|
||||
Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
|
||||
|
||||
private lateinit var tvStatus: TextView
|
||||
private lateinit var tvDeviceId: TextView
|
||||
private lateinit var btnConnect: Button
|
||||
private lateinit var btnDisconnect: Button
|
||||
private lateinit var etServerUrl: EditText
|
||||
private lateinit var rvSessions: LinearLayout
|
||||
|
||||
private val deviceId: String by lazy {
|
||||
Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID) ?: UUID.randomUUID().toString()
|
||||
}
|
||||
|
||||
|
||||
companion object {
|
||||
private const val PERMISSION_REQUEST_CODE = 100
|
||||
private const val PERMISSIONS_REQUEST_CODE = 100
|
||||
private val REQUIRED_PERMISSIONS = arrayOf(
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.RECORD_AUDIO,
|
||||
Manifest.permission.INTERNET,
|
||||
Manifest.permission.ACCESS_NETWORK_STATE
|
||||
Manifest.permission.INTERNET
|
||||
)
|
||||
|
||||
private const val SERVER_URL = "http://10.0.2.2:3000" // Для эмулятора, для реального устройства укажите IP сервера
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
initViews()
|
||||
checkPermissions()
|
||||
}
|
||||
|
||||
|
||||
private fun initViews() {
|
||||
tvStatus = findViewById(R.id.tvStatus)
|
||||
tvDeviceId = findViewById(R.id.tvDeviceId)
|
||||
btnConnect = findViewById(R.id.btnConnect)
|
||||
btnDisconnect = findViewById(R.id.btnDisconnect)
|
||||
etServerUrl = findViewById(R.id.etServerUrl)
|
||||
rvSessions = findViewById(R.id.rvSessions)
|
||||
|
||||
tvDeviceId.text = "Device ID: $deviceId"
|
||||
etServerUrl.setText("http://192.168.1.100:3001")
|
||||
|
||||
btnConnect.setOnClickListener {
|
||||
connectToServer()
|
||||
}
|
||||
|
||||
btnDisconnect.setOnClickListener {
|
||||
disconnectFromServer()
|
||||
}
|
||||
|
||||
updateUI(false)
|
||||
}
|
||||
|
||||
private fun checkPermissions() {
|
||||
val missingPermissions = REQUIRED_PERMISSIONS.filter {
|
||||
ContextCompat.checkSelfPermission(this, it) != PackageManager.PERMISSION_GRANTED
|
||||
}
|
||||
|
||||
|
||||
if (missingPermissions.isNotEmpty()) {
|
||||
ActivityCompat.requestPermissions(this, missingPermissions.toTypedArray(), PERMISSION_REQUEST_CODE)
|
||||
} else {
|
||||
initializeComponents()
|
||||
ActivityCompat.requestPermissions(this, missingPermissions.toTypedArray(), PERMISSIONS_REQUEST_CODE)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
||||
|
||||
if (requestCode == PERMISSION_REQUEST_CODE) {
|
||||
val allPermissionsGranted = grantResults.all { it == PackageManager.PERMISSION_GRANTED }
|
||||
|
||||
if (allPermissionsGranted) {
|
||||
initializeComponents()
|
||||
} else {
|
||||
showPermissionDeniedDialog()
|
||||
|
||||
if (requestCode == PERMISSIONS_REQUEST_CODE) {
|
||||
val allGranted = grantResults.all { it == PackageManager.PERMISSION_GRANTED }
|
||||
if (!allGranted) {
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle("Необходимы разрешения")
|
||||
.setMessage("Для работы приложения необходимы разрешения на камеру, микрофон и интернет")
|
||||
.setPositiveButton("OK") { _, _ -> finish() }
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showPermissionDeniedDialog() {
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle("Необходимы разрешения")
|
||||
.setMessage("Для работы приложения необходим доступ к камере, микрофону и интернету")
|
||||
.setPositiveButton("OK") { _, _ -> finish() }
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun initializeComponents() {
|
||||
try {
|
||||
// Инициализируем EGL контекст для WebRTC
|
||||
eglBase = EglBase.create()
|
||||
|
||||
// Инициализируем менеджеры
|
||||
cameraManager = CameraManager(this, eglBase)
|
||||
webRTCManager = WebRTCManager(this, cameraManager)
|
||||
socketManager = SocketManager(SERVER_URL)
|
||||
|
||||
setupSocketCallbacks()
|
||||
setupWebRTCCallbacks()
|
||||
setupUI()
|
||||
connectToServer()
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e("MainActivity", "Error initializing components", e)
|
||||
Toast.makeText(this, "Ошибка инициализации: ${e.message}", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupSocketCallbacks() {
|
||||
socketManager.onCameraRequest = { sessionId, operatorId, cameraTypeStr ->
|
||||
runOnUiThread {
|
||||
val cameraType = parseCameraType(cameraTypeStr)
|
||||
showCameraRequestDialog(sessionId, operatorId, cameraType)
|
||||
}
|
||||
}
|
||||
|
||||
socketManager.onCameraSwitch = { sessionId, cameraTypeStr ->
|
||||
runOnUiThread {
|
||||
val cameraType = parseCameraType(cameraTypeStr)
|
||||
val success = webRTCManager.switchCamera(sessionId, cameraType)
|
||||
updateCameraStatus(sessionId, if (success) "Камера переключена на: $cameraTypeStr" else "Ошибка переключения камеры")
|
||||
}
|
||||
}
|
||||
|
||||
socketManager.onCameraDisconnect = { sessionId ->
|
||||
runOnUiThread {
|
||||
webRTCManager.closeSession(sessionId)
|
||||
updateConnectionStatus("Оператор отключился")
|
||||
}
|
||||
}
|
||||
|
||||
socketManager.onWebRTCAnswer = { sessionId, answer ->
|
||||
webRTCManager.handleAnswer(sessionId, answer)
|
||||
}
|
||||
|
||||
socketManager.onWebRTCIceCandidate = { sessionId, candidate ->
|
||||
webRTCManager.handleICECandidate(sessionId, candidate)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupWebRTCCallbacks() {
|
||||
webRTCManager.onOfferCreated = { sessionId, offer ->
|
||||
socketManager.sendWebRTCOffer(sessionId, offer)
|
||||
}
|
||||
|
||||
webRTCManager.onAnswerCreated = { sessionId, answer ->
|
||||
socketManager.sendWebRTCAnswer(sessionId, answer)
|
||||
}
|
||||
|
||||
webRTCManager.onICECandidate = { sessionId, candidate ->
|
||||
socketManager.sendICECandidate(sessionId, candidate)
|
||||
}
|
||||
|
||||
webRTCManager.onConnectionStateChanged = { sessionId, state ->
|
||||
runOnUiThread {
|
||||
val statusText = when (state) {
|
||||
org.webrtc.PeerConnection.PeerConnectionState.CONNECTING -> "Подключение..."
|
||||
org.webrtc.PeerConnection.PeerConnectionState.CONNECTED -> "Подключено"
|
||||
org.webrtc.PeerConnection.PeerConnectionState.DISCONNECTED -> "Отключено"
|
||||
org.webrtc.PeerConnection.PeerConnectionState.FAILED -> "Ошибка подключения"
|
||||
org.webrtc.PeerConnection.PeerConnectionState.CLOSED -> "Соединение закрыто"
|
||||
else -> "Неизвестно"
|
||||
}
|
||||
updateConnectionStatus("$statusText (Сессия: $sessionId)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupUI() {
|
||||
// Показываем доступные типы камер
|
||||
val availableTypes = cameraManager.getAvailableCameraTypes()
|
||||
binding.availableCamerasText.text = "Доступные камеры: ${availableTypes.joinToString(", ")}"
|
||||
|
||||
// Показываем Device ID
|
||||
binding.deviceIdText.text = "Device ID: $deviceId"
|
||||
|
||||
// Статус подключения
|
||||
updateConnectionStatus("Инициализация...")
|
||||
}
|
||||
|
||||
|
||||
private fun connectToServer() {
|
||||
val deviceInfo = mapOf(
|
||||
"model" to android.os.Build.MODEL,
|
||||
"manufacturer" to android.os.Build.MANUFACTURER,
|
||||
"androidVersion" to android.os.Build.VERSION.RELEASE,
|
||||
"appVersion" to BuildConfig.VERSION_NAME
|
||||
)
|
||||
|
||||
socketManager.connect(deviceId, deviceInfo)
|
||||
updateConnectionStatus("Подключение к серверу...")
|
||||
}
|
||||
|
||||
private fun handleCameraRequest(sessionId: String, operatorId: String, cameraType: String) {
|
||||
runOnUiThread {
|
||||
binding.tvStatus.text = "Запрос доступа к камере от оператора: $operatorId"
|
||||
binding.tvCameraType.text = "Тип камеры: $cameraType"
|
||||
|
||||
val serverUrl = etServerUrl.text.toString().trim()
|
||||
if (serverUrl.isEmpty()) {
|
||||
Toast.makeText(this, "Введите URL сервера", Toast.LENGTH_SHORT).show()
|
||||
return
|
||||
}
|
||||
|
||||
tvStatus.text = "Подключение..."
|
||||
btnConnect.isEnabled = false
|
||||
|
||||
// TODO: Implement actual connection logic
|
||||
lifecycleScope.launch {
|
||||
try {
|
||||
cameraManager.startCamera(cameraType) { success ->
|
||||
if (success) {
|
||||
val streamUrl = webRTCManager.createOffer(sessionId) { offer ->
|
||||
socketManager.sendWebRTCOffer(sessionId, offer)
|
||||
}
|
||||
socketManager.respondToCameraRequest(sessionId, true, streamUrl)
|
||||
updateConnectionStatus("Трансляция активна")
|
||||
} else {
|
||||
socketManager.respondToCameraRequest(sessionId, false, null, "Не удалось запустить камеру")
|
||||
updateConnectionStatus("Ошибка запуска камеры")
|
||||
}
|
||||
}
|
||||
// Simulate connection
|
||||
kotlinx.coroutines.delay(2000)
|
||||
updateUI(true)
|
||||
tvStatus.text = "Подключено к $serverUrl"
|
||||
Toast.makeText(this@MainActivity, "Подключено!", Toast.LENGTH_SHORT).show()
|
||||
} catch (e: Exception) {
|
||||
Log.e("MainActivity", "Error starting camera", e)
|
||||
socketManager.respondToCameraRequest(sessionId, false, null, e.message)
|
||||
updateUI(false)
|
||||
tvStatus.text = "Ошибка подключения: ${e.message}"
|
||||
Toast.makeText(this@MainActivity, "Ошибка: ${e.message}", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleCameraSwitch(sessionId: String, cameraType: String) {
|
||||
runOnUiThread {
|
||||
binding.tvCameraType.text = "Переключение на: $cameraType"
|
||||
cameraManager.switchCamera(cameraType) { success ->
|
||||
if (success) {
|
||||
updateConnectionStatus("Камера переключена на $cameraType")
|
||||
} else {
|
||||
updateConnectionStatus("Ошибка переключения камеры")
|
||||
}
|
||||
}
|
||||
|
||||
private fun disconnectFromServer() {
|
||||
tvStatus.text = "Отключение..."
|
||||
btnDisconnect.isEnabled = false
|
||||
|
||||
// TODO: Implement actual disconnection logic
|
||||
lifecycleScope.launch {
|
||||
kotlinx.coroutines.delay(1000)
|
||||
updateUI(false)
|
||||
tvStatus.text = "Отключено"
|
||||
Toast.makeText(this@MainActivity, "Отключено", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleCameraDisconnect(sessionId: String) {
|
||||
runOnUiThread {
|
||||
cameraManager.stopCamera()
|
||||
webRTCManager.endSession(sessionId)
|
||||
updateConnectionStatus("Трансляция завершена")
|
||||
binding.tvCameraType.text = ""
|
||||
}
|
||||
|
||||
private fun updateUI(connected: Boolean) {
|
||||
btnConnect.isEnabled = !connected
|
||||
btnDisconnect.isEnabled = connected
|
||||
etServerUrl.isEnabled = !connected
|
||||
}
|
||||
|
||||
private fun updateConnectionStatus(status: String) {
|
||||
runOnUiThread {
|
||||
binding.tvStatus.text = status
|
||||
Log.i("MainActivity", "Status: $status")
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupUI() {
|
||||
binding.btnDisconnect.setOnClickListener {
|
||||
socketManager.disconnect()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
cameraManager.release()
|
||||
webRTCManager.release()
|
||||
socketManager.disconnect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.godeye.android.camera
|
||||
|
||||
import android.content.Context
|
||||
import android.hardware.camera2.CameraManager as SystemCameraManager
|
||||
import android.hardware.camera2.CameraCharacteristics
|
||||
import android.util.Log
|
||||
|
||||
class CameraManager(private val context: Context) {
|
||||
|
||||
private val systemCameraManager = context.getSystemService(Context.CAMERA_SERVICE) as SystemCameraManager
|
||||
|
||||
companion object {
|
||||
private const val TAG = "CameraManager"
|
||||
}
|
||||
|
||||
fun getAvailableCameras(): List<String> {
|
||||
val availableCameras = mutableListOf<String>()
|
||||
|
||||
try {
|
||||
val cameraIds = systemCameraManager.cameraIdList
|
||||
|
||||
for (cameraId in cameraIds) {
|
||||
val characteristics = systemCameraManager.getCameraCharacteristics(cameraId)
|
||||
val facing = characteristics.get(CameraCharacteristics.LENS_FACING)
|
||||
|
||||
when (facing) {
|
||||
CameraCharacteristics.LENS_FACING_BACK -> {
|
||||
availableCameras.add("back")
|
||||
|
||||
// Проверяем на наличие широкоугольной или телекамеры
|
||||
val focalLengths = characteristics.get(CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS)
|
||||
if (focalLengths != null && focalLengths.size > 1) {
|
||||
// Предполагаем, что есть дополнительные камеры
|
||||
if (focalLengths.minOrNull() ?: 0f < 3.0f) {
|
||||
availableCameras.add("wide")
|
||||
}
|
||||
if (focalLengths.maxOrNull() ?: 0f > 6.0f) {
|
||||
availableCameras.add("telephoto")
|
||||
}
|
||||
}
|
||||
}
|
||||
CameraCharacteristics.LENS_FACING_FRONT -> {
|
||||
availableCameras.add("front")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Удаляем дубликаты
|
||||
return availableCameras.distinct()
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Error getting available cameras", e)
|
||||
// Возвращаем минимальный набор по умолчанию
|
||||
return listOf("back", "front")
|
||||
}
|
||||
}
|
||||
|
||||
fun getCameraId(cameraType: String): String? {
|
||||
try {
|
||||
val cameraIds = systemCameraManager.cameraIdList
|
||||
|
||||
for (cameraId in cameraIds) {
|
||||
val characteristics = systemCameraManager.getCameraCharacteristics(cameraId)
|
||||
val facing = characteristics.get(CameraCharacteristics.LENS_FACING)
|
||||
|
||||
when (cameraType) {
|
||||
"back" -> {
|
||||
if (facing == CameraCharacteristics.LENS_FACING_BACK) {
|
||||
return cameraId
|
||||
}
|
||||
}
|
||||
"front" -> {
|
||||
if (facing == CameraCharacteristics.LENS_FACING_FRONT) {
|
||||
return cameraId
|
||||
}
|
||||
}
|
||||
"wide", "telephoto" -> {
|
||||
// Для простоты используем основную заднюю камеру
|
||||
if (facing == CameraCharacteristics.LENS_FACING_BACK) {
|
||||
return cameraId
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Error getting camera ID for type: $cameraType", e)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
fun getSupportedSizes(cameraId: String): List<android.util.Size> {
|
||||
return try {
|
||||
val characteristics = systemCameraManager.getCameraCharacteristics(cameraId)
|
||||
val configs = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
|
||||
configs?.getOutputSizes(android.graphics.SurfaceTexture::class.java)?.toList() ?: emptyList()
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Error getting supported sizes for camera: $cameraId", e)
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.godeye.android.network
|
||||
|
||||
import io.socket.client.IO
|
||||
import io.socket.client.Socket
|
||||
import io.socket.emitter.Emitter
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import android.util.Log
|
||||
|
||||
class SocketManager(
|
||||
private val deviceId: String,
|
||||
private val onCameraRequest: (String, String, String) -> Unit,
|
||||
private val onConnectionStatus: (String) -> Unit,
|
||||
private val onError: (String) -> Unit
|
||||
) {
|
||||
private var socket: Socket? = null
|
||||
private val serverUrl = "http://10.0.2.2:3001" // Android emulator localhost
|
||||
|
||||
companion object {
|
||||
private const val TAG = "SocketManager"
|
||||
}
|
||||
|
||||
fun connect(availableCameras: List<String>) {
|
||||
try {
|
||||
val opts = IO.Options()
|
||||
opts.reconnection = true
|
||||
opts.timeout = 10000
|
||||
|
||||
socket = IO.socket(serverUrl, opts)
|
||||
|
||||
socket?.let { sock ->
|
||||
sock.on(Socket.EVENT_CONNECT, onConnect)
|
||||
sock.on(Socket.EVENT_DISCONNECT, onDisconnect)
|
||||
sock.on(Socket.EVENT_CONNECT_ERROR, onConnectError)
|
||||
sock.on("register:success", onRegisterSuccess)
|
||||
sock.on("register:error", onRegisterError)
|
||||
sock.on("camera:request", onCameraRequestReceived)
|
||||
sock.on("camera:switch", onCameraSwitchReceived)
|
||||
sock.on("camera:disconnect", onCameraDisconnectReceived)
|
||||
sock.on("webrtc:offer", onWebRTCOffer)
|
||||
sock.on("webrtc:answer", onWebRTCAnswer)
|
||||
sock.on("webrtc:ice-candidate", onWebRTCIceCandidate)
|
||||
|
||||
sock.connect()
|
||||
|
||||
// Регистрация устройства
|
||||
val deviceInfo = JSONObject().apply {
|
||||
put("model", android.os.Build.MODEL)
|
||||
put("manufacturer", android.os.Build.MANUFACTURER)
|
||||
put("androidVersion", android.os.Build.VERSION.RELEASE)
|
||||
put("appVersion", "1.0.0")
|
||||
put("availableCameras", JSONArray(availableCameras))
|
||||
}
|
||||
|
||||
val registerData = JSONObject().apply {
|
||||
put("deviceId", deviceId)
|
||||
put("deviceInfo", deviceInfo)
|
||||
}
|
||||
|
||||
sock.emit("register:android", registerData)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Connection error", e)
|
||||
onError("Ошибка подключения: ${e.message}")
|
||||
}
|
||||
}
|
||||
|
||||
fun disconnect() {
|
||||
socket?.disconnect()
|
||||
socket?.off()
|
||||
socket = null
|
||||
onConnectionStatus("Отключено")
|
||||
}
|
||||
|
||||
fun acceptCameraRequest(sessionId: String, accepted: Boolean) {
|
||||
val response = JSONObject().apply {
|
||||
put("sessionId", sessionId)
|
||||
put("accepted", accepted)
|
||||
put("message", if (accepted) "Доступ разрешен" else "Доступ отклонен")
|
||||
}
|
||||
socket?.emit("camera:response", response)
|
||||
Log.d(TAG, "Camera request response sent: $accepted")
|
||||
}
|
||||
|
||||
// Socket event handlers
|
||||
private val onConnect = Emitter.Listener {
|
||||
Log.d(TAG, "Connected to server")
|
||||
onConnectionStatus("Подключено")
|
||||
}
|
||||
|
||||
private val onDisconnect = Emitter.Listener {
|
||||
Log.d(TAG, "Disconnected from server")
|
||||
onConnectionStatus("Отключено")
|
||||
}
|
||||
|
||||
private val onConnectError = Emitter.Listener { args ->
|
||||
Log.e(TAG, "Connection error: ${args[0]}")
|
||||
onError("Ошибка подключения к серверу")
|
||||
}
|
||||
|
||||
private val onRegisterSuccess = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
Log.d(TAG, "Registration successful: ${data.getString("deviceId")}")
|
||||
onConnectionStatus("Зарегистрировано")
|
||||
}
|
||||
|
||||
private val onRegisterError = Emitter.Listener { args ->
|
||||
val error = args[0] as JSONObject
|
||||
Log.e(TAG, "Registration error: ${error.getString("message")}")
|
||||
onError("Ошибка регистрации: ${error.getString("message")}")
|
||||
}
|
||||
|
||||
private val onCameraRequestReceived = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
val sessionId = data.getString("sessionId")
|
||||
val operatorId = data.getString("operatorId")
|
||||
val cameraType = data.getString("cameraType")
|
||||
|
||||
Log.d(TAG, "Camera request received: $sessionId, $operatorId, $cameraType")
|
||||
onCameraRequest(sessionId, operatorId, cameraType)
|
||||
}
|
||||
|
||||
private val onCameraSwitchReceived = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
val sessionId = data.getString("sessionId")
|
||||
val cameraType = data.getString("cameraType")
|
||||
|
||||
Log.d(TAG, "Camera switch request: $sessionId -> $cameraType")
|
||||
// TODO: Implement camera switching
|
||||
}
|
||||
|
||||
private val onCameraDisconnectReceived = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
val sessionId = data.getString("sessionId")
|
||||
|
||||
Log.d(TAG, "Camera disconnect request: $sessionId")
|
||||
// TODO: Implement camera disconnect
|
||||
}
|
||||
|
||||
private val onWebRTCOffer = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
val sessionId = data.getString("sessionId")
|
||||
val offer = data.getJSONObject("offer")
|
||||
|
||||
Log.d(TAG, "WebRTC offer received for session: $sessionId")
|
||||
// TODO: Handle WebRTC offer
|
||||
}
|
||||
|
||||
private val onWebRTCAnswer = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
val sessionId = data.getString("sessionId")
|
||||
val answer = data.getJSONObject("answer")
|
||||
|
||||
Log.d(TAG, "WebRTC answer received for session: $sessionId")
|
||||
// TODO: Handle WebRTC answer
|
||||
}
|
||||
|
||||
private val onWebRTCIceCandidate = Emitter.Listener { args ->
|
||||
val data = args[0] as JSONObject
|
||||
val sessionId = data.getString("sessionId")
|
||||
val candidate = data.getJSONObject("candidate")
|
||||
|
||||
Log.d(TAG, "WebRTC ICE candidate received for session: $sessionId")
|
||||
// TODO: Handle WebRTC ICE candidate
|
||||
}
|
||||
}
|
||||
@@ -1,92 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res/android-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!-- Status Section -->
|
||||
<TextView
|
||||
android:id="@+id/tvStatus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Инициализация..."
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:padding="8dp"
|
||||
android:background="@color/status_background"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Device Info -->
|
||||
<TextView
|
||||
android:id="@+id/deviceIdText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Device ID: ---"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/availableCamerasText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Доступные камеры: ---"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Camera Type -->
|
||||
<TextView
|
||||
android:id="@+id/tvCameraType"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Video Preview -->
|
||||
<org.webrtc.SurfaceViewRenderer
|
||||
android:id="@+id/localVideoView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@color/video_background" />
|
||||
|
||||
<!-- Connection Status -->
|
||||
<TextView
|
||||
android:id="@+id/connectionStatusText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Статус подключения: Отключено"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Control Buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnConnect"
|
||||
android:layout_width="0dp"
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Подключиться"
|
||||
android:layout_marginEnd="8dp" />
|
||||
android:text="GodEye Signal Center"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:textColor="@color/design_default_color_primary" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDisconnect"
|
||||
android:layout_width="0dp"
|
||||
<!-- Device Info -->
|
||||
<TextView
|
||||
android:id="@+id/tvDeviceId"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Отключиться"
|
||||
android:layout_marginStart="8dp"
|
||||
android:enabled="false" />
|
||||
android:text="Device ID: ..."
|
||||
android:textSize="14sp"
|
||||
android:background="@color/design_default_color_surface"
|
||||
android:padding="12dp"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Connection Status -->
|
||||
<TextView
|
||||
android:id="@+id/tvStatus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Отключено"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textAlignment="center"
|
||||
android:padding="12dp"
|
||||
android:background="@color/design_default_color_surface"
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<!-- Server Configuration -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Настройки сервера"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etServerUrl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="URL сервера (например: http://192.168.1.100:3001)"
|
||||
android:inputType="textUri"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- Control Buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="32dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnConnect"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Подключиться"
|
||||
android:layout_marginEnd="8dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDisconnect"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="Отключиться"
|
||||
android:layout_marginStart="8dp"
|
||||
android:enabled="false" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Active Sessions -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Активные сессии"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rvSessions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/design_default_color_surface"
|
||||
android:padding="16dp"
|
||||
android:minHeight="100dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Нет активных сессий"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/darker_gray" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 0 B |
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.GodEye" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_500</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<style name="Theme.GodEye" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/design_default_color_primary</item>
|
||||
<item name="colorPrimaryVariant">@color/design_default_color_primary_variant</item>
|
||||
<item name="colorOnPrimary">@color/design_default_color_on_primary</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="colorSecondary">@color/design_default_color_secondary</item>
|
||||
<item name="colorSecondaryVariant">@color/design_default_color_secondary_variant</item>
|
||||
<item name="colorOnSecondary">@color/design_default_color_on_secondary</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<full-backup-content>
|
||||
<exclude domain="sharedpref" path="device_prefs"/>
|
||||
<exclude domain="database" path="room_master_table.db"/>
|
||||
<!-- Exclude sensitive data from backup -->
|
||||
<exclude domain="sharedpref" path="secure_prefs.xml"/>
|
||||
</full-backup-content>
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<paths>
|
||||
<external-files-path name="external_files" path="."/>
|
||||
</paths>
|
||||
</resources>
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
ext.kotlin_version = "1.8.10"
|
||||
ext.kotlin_version = '1.9.20'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.1.2'
|
||||
classpath 'com.android.tools.build:gradle:8.2.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
420
android-client/gradle-8.0/LICENSE
Normal file
420
android-client/gradle-8.0/LICENSE
Normal file
@@ -0,0 +1,420 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
==============================================================================
|
||||
Licenses for included components:
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Eclipse Public License 1.0
|
||||
https://opensource.org/licenses/EPL-1.0
|
||||
|
||||
junit:junit
|
||||
org.sonatype.aether:aether-api
|
||||
org.sonatype.aether:aether-connector-wagon
|
||||
org.sonatype.aether:aether-impl
|
||||
org.sonatype.aether:aether-spi
|
||||
org.sonatype.aether:aether-util
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3-Clause BSD
|
||||
https://opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
com.google.code.findbugs:jsr305
|
||||
|
||||
org.hamcrest:hamcrest-core
|
||||
BSD License
|
||||
|
||||
Copyright (c) 2000-2015 www.hamcrest.org
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of
|
||||
conditions and the following disclaimer. Redistributions in binary form must reproduce
|
||||
the above copyright notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the distribution.
|
||||
|
||||
Neither the name of Hamcrest nor the names of its contributors may be used to endorse
|
||||
or promote products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
|
||||
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
|
||||
com.esotericsoftware.kryo:kryo
|
||||
com.esotericsoftware.minlog:minlog
|
||||
Copyright (c) 2008-2018, Nathan Sweet All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
Neither the name of Esoteric Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
org.ow2.asm:asm
|
||||
org.ow2.asm:asm-analysis
|
||||
org.ow2.asm:asm-commons
|
||||
org.ow2.asm:asm-tree
|
||||
org.ow2.asm:asm-util
|
||||
ASM: a very small and fast Java bytecode manipulation framework
|
||||
Copyright (c) 2000-2011 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
MIT
|
||||
|
||||
com.googlecode.plist:dd-plist
|
||||
dd-plist - An open source library to parse and generate property lists
|
||||
Copyright (C) 2016 Daniel Dreibrodt
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
org.bouncycastle:bcpg-jdk15on
|
||||
org.bouncycastle:bcprov-jdk15on
|
||||
Copyright (c) 2000 - 2019 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
org.slf4j:jcl-over-slf4j
|
||||
org.slf4j:jul-to-slf4j
|
||||
org.slf4j:log4j-over-slf4j
|
||||
org.slf4j:slf4j-api
|
||||
Copyright (c) 2004-2017 QOS.ch
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
CDDL
|
||||
https://opensource.org/licenses/CDDL-1.0
|
||||
|
||||
com.sun.xml.bind:jaxb-impl
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
LGPL 2.1
|
||||
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
|
||||
|
||||
org.samba.jcifs:jcifs
|
||||
|
||||
org.jetbrains.intellij.deps:trove4j
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
License for the GNU Trove library included by the Kotlin embeddable compiler
|
||||
------------------------------------------------------------------------------
|
||||
The source code for GNU Trove is licensed under the Lesser GNU Public License (LGPL).
|
||||
|
||||
Copyright (c) 2001, Eric D. Friedman All Rights Reserved. This library is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
||||
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
Two classes (HashFunctions and PrimeFinder) included in Trove are licensed under the following terms:
|
||||
|
||||
Copyright (c) 1999 CERN - European Organization for Nuclear Research. Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and
|
||||
that both that copyright notice and this permission notice appear in supporting documentation. CERN makes no representations about the
|
||||
suitability of this software for any purpose. It is provided "as is" without expressed or implied warranty.
|
||||
|
||||
The source code of modified GNU Trove library is available at
|
||||
https://github.com/JetBrains/intellij-deps-trove4j (with trove4j_changes.txt describing the changes)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Eclipse Distribution License 1.0
|
||||
https://www.eclipse.org/org/documents/edl-v10.php
|
||||
|
||||
org.eclipse.jgit:org.eclipse.jgit
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
BSD-style
|
||||
|
||||
com.jcraft:jsch
|
||||
com.jcraft:jzlib
|
||||
|
||||
Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of the authors may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
|
||||
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Eclipse Public License 2.0
|
||||
https://www.eclipse.org/legal/epl-2.0/
|
||||
|
||||
org.junit.platform:junit-platform-launcher
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Mozilla Public License 2.0
|
||||
https://www.mozilla.org/en-US/MPL/2.0/
|
||||
|
||||
org.mozilla:rhino
|
||||
21
android-client/gradle-8.0/NOTICE
Normal file
21
android-client/gradle-8.0/NOTICE
Normal file
@@ -0,0 +1,21 @@
|
||||
=========================================================================
|
||||
== NOTICE file corresponding to the section 4 d of ==
|
||||
== the Apache License, Version 2.0, ==
|
||||
== in this case for the Gradle distribution. ==
|
||||
=========================================================================
|
||||
|
||||
This product includes software developed by
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
It includes the following other software:
|
||||
|
||||
Groovy (http://groovy-lang.org)
|
||||
SLF4J (http://www.slf4j.org)
|
||||
JUnit (http://www.junit.org)
|
||||
JCIFS (http://jcifs.samba.org)
|
||||
HttpClient (https://hc.apache.org/httpcomponents-client-4.5.x/)
|
||||
|
||||
For licenses, see the LICENSE file.
|
||||
|
||||
If any software distributed with Gradle does not have an Apache 2 License, its license is explicitly listed in the
|
||||
LICENSE file.
|
||||
11
android-client/gradle-8.0/README
Normal file
11
android-client/gradle-8.0/README
Normal file
@@ -0,0 +1,11 @@
|
||||
Gradle is a build tool with a focus on build automation and support for multi-language development. If you are building, testing, publishing, and deploying software on any platform, Gradle offers a flexible model that can support the entire development lifecycle from compiling and packaging code to publishing web sites. Gradle has been designed to support build automation across multiple languages and platforms including Java, Scala, Android, C/C++, and Groovy, and is closely integrated with development tools and continuous integration servers including Eclipse, IntelliJ, and Jenkins.
|
||||
|
||||
For more information about Gradle, please visit: https://gradle.org
|
||||
|
||||
If you are using the "all" distribution, the User Manual is included in your distribution.
|
||||
|
||||
If you are using the "bin" distribution, a copy of the User Manual is available on https://docs.gradle.org.
|
||||
|
||||
Typing `gradle help` prints the command line help.
|
||||
|
||||
Typing `gradle tasks` shows all the tasks of a Gradle build.
|
||||
244
android-client/gradle-8.0/bin/gradle
Executable file
244
android-client/gradle-8.0/bin/gradle
Executable file
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/lib/gradle-launcher-8.0.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.launcher.GradleMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
24
android-client/gradlew.bat → android-client/gradle-8.0/bin/gradle.bat
Normal file → Executable file
24
android-client/gradlew.bat → android-client/gradle-8.0/bin/gradle.bat
Normal file → Executable file
@@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -25,9 +25,10 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
set APP_HOME=%DIRNAME%..
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -67,22 +68,23 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=%APP_HOME%\lib\gradle-launcher-8.0.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.launcher.GradleMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd_ return code when the batch file is called from a command line
|
||||
rem or when the batch file is called from another batch file.
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
1
android-client/gradle-8.0/init.d/readme.txt
Normal file
1
android-client/gradle-8.0/init.d/readme.txt
Normal file
@@ -0,0 +1 @@
|
||||
You can add .gradle (e.g. test.gradle) init scripts to this directory. Each one is executed at the start of the build.
|
||||
BIN
android-client/gradle-8.0/lib/annotations-20.1.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/annotations-20.1.0.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/ant-1.10.11.jar
Normal file
BIN
android-client/gradle-8.0/lib/ant-1.10.11.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/ant-antlr-1.10.12.jar
Normal file
BIN
android-client/gradle-8.0/lib/ant-antlr-1.10.12.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/ant-junit-1.10.12.jar
Normal file
BIN
android-client/gradle-8.0/lib/ant-junit-1.10.12.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/ant-launcher-1.10.11.jar
Normal file
BIN
android-client/gradle-8.0/lib/ant-launcher-1.10.11.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/antlr4-runtime-4.7.2.jar
Normal file
BIN
android-client/gradle-8.0/lib/antlr4-runtime-4.7.2.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/asm-9.3.jar
Normal file
BIN
android-client/gradle-8.0/lib/asm-9.3.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/asm-analysis-9.3.jar
Normal file
BIN
android-client/gradle-8.0/lib/asm-analysis-9.3.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/asm-commons-9.3.jar
Normal file
BIN
android-client/gradle-8.0/lib/asm-commons-9.3.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/asm-tree-9.3.jar
Normal file
BIN
android-client/gradle-8.0/lib/asm-tree-9.3.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/commons-compress-1.21.jar
Normal file
BIN
android-client/gradle-8.0/lib/commons-compress-1.21.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/commons-io-2.11.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/commons-io-2.11.0.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/commons-lang-2.6.jar
Normal file
BIN
android-client/gradle-8.0/lib/commons-lang-2.6.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/failureaccess-1.0.1.jar
Normal file
BIN
android-client/gradle-8.0/lib/failureaccess-1.0.1.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/fastutil-8.5.2-min.jar
Normal file
BIN
android-client/gradle-8.0/lib/fastutil-8.5.2-min.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/file-events-0.22-milestone-24.jar
Normal file
BIN
android-client/gradle-8.0/lib/file-events-0.22-milestone-24.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-api-metadata-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-api-metadata-8.0.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-base-annotations-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-base-annotations-8.0.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-base-services-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-base-services-8.0.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-bootstrap-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-bootstrap-8.0.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-build-cache-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-build-cache-8.0.jar
Normal file
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-build-cache-base-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-build-cache-base-8.0.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
android-client/gradle-8.0/lib/gradle-build-events-8.0.jar
Normal file
BIN
android-client/gradle-8.0/lib/gradle-build-events-8.0.jar
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user