diff --git a/android-client/.gradle/9.0-milestone-1/checksums/checksums.lock b/android-client/.gradle/9.0-milestone-1/checksums/checksums.lock
new file mode 100644
index 0000000..46f8893
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/checksums/checksums.lock differ
diff --git a/android-client/.gradle/9.0-milestone-1/checksums/md5-checksums.bin b/android-client/.gradle/9.0-milestone-1/checksums/md5-checksums.bin
new file mode 100644
index 0000000..9d2824e
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/checksums/md5-checksums.bin differ
diff --git a/android-client/.gradle/9.0-milestone-1/checksums/sha1-checksums.bin b/android-client/.gradle/9.0-milestone-1/checksums/sha1-checksums.bin
new file mode 100644
index 0000000..0e43c17
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/checksums/sha1-checksums.bin differ
diff --git a/android-client/.gradle/9.0-milestone-1/executionHistory/executionHistory.bin b/android-client/.gradle/9.0-milestone-1/executionHistory/executionHistory.bin
new file mode 100644
index 0000000..1f49774
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/executionHistory/executionHistory.bin differ
diff --git a/android-client/.gradle/9.0-milestone-1/executionHistory/executionHistory.lock b/android-client/.gradle/9.0-milestone-1/executionHistory/executionHistory.lock
new file mode 100644
index 0000000..8735fbd
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/executionHistory/executionHistory.lock differ
diff --git a/android-client/.gradle/9.0-milestone-1/fileChanges/last-build.bin b/android-client/.gradle/9.0-milestone-1/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/fileChanges/last-build.bin differ
diff --git a/android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.bin b/android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.bin
new file mode 100644
index 0000000..8efabc2
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.bin differ
diff --git a/android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock b/android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..64361a8
Binary files /dev/null and b/android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock differ
diff --git a/android-client/.gradle/9.0-milestone-1/gc.properties b/android-client/.gradle/9.0-milestone-1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/android-client/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android-client/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000..d839cc4
Binary files /dev/null and b/android-client/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/android-client/.gradle/buildOutputCleanup/cache.properties b/android-client/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..91d7695
--- /dev/null
+++ b/android-client/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Sun Sep 28 22:04:42 KST 2025
+gradle.version=9.0-milestone-1
diff --git a/android-client/.gradle/buildOutputCleanup/outputFiles.bin b/android-client/.gradle/buildOutputCleanup/outputFiles.bin
new file mode 100644
index 0000000..02e36e6
Binary files /dev/null and b/android-client/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/android-client/.gradle/config.properties b/android-client/.gradle/config.properties
new file mode 100644
index 0000000..4d961ef
--- /dev/null
+++ b/android-client/.gradle/config.properties
@@ -0,0 +1,2 @@
+#Sun Sep 28 22:05:42 KST 2025
+java.home=/snap/android-studio/205/jbr
diff --git a/android-client/.gradle/vcs-1/gc.properties b/android-client/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/android-client/.run/app.run.xml b/android-client/.run/app.run.xml
new file mode 100644
index 0000000..8e7623a
--- /dev/null
+++ b/android-client/.run/app.run.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android-client/android-client.iml b/android-client/android-client.iml
deleted file mode 100644
index f76df2b..0000000
--- a/android-client/android-client.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/android-client/app/build.gradle b/android-client/app/build.gradle
new file mode 100644
index 0000000..fd50cec
--- /dev/null
+++ b/android-client/app/build.gradle
@@ -0,0 +1,68 @@
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+}
+
+android {
+ namespace 'com.godeye.android'
+ compileSdk 34
+
+ defaultConfig {
+ applicationId "com.godeye.android"
+ minSdk 24
+ targetSdk 34
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ buildFeatures {
+ viewBinding true
+ buildConfig true
+ }
+}
+
+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 'androidx.constraintlayout:constraintlayout:2.1.4'
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.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
+ implementation 'com.google.code.gson:gson:2.10.1'
+
+ // Testing
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+}
diff --git a/android-client/app/proguard-rules.pro b/android-client/app/proguard-rules.pro
new file mode 100644
index 0000000..93183c1
--- /dev/null
+++ b/android-client/app/proguard-rules.pro
@@ -0,0 +1,29 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
+
+# WebRTC ProGuard rules
+-keep class org.webrtc.** { *; }
+-dontwarn org.webrtc.**
+
+# Socket.IO ProGuard rules
+-keep class io.socket.** { *; }
+-dontwarn io.socket.**
diff --git a/android-client/app/src/main/AndroidManifest.xml b/android-client/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a016f17
--- /dev/null
+++ b/android-client/app/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android-client/app/src/main/java/com/godeye/android/MainActivity.kt b/android-client/app/src/main/java/com/godeye/android/MainActivity.kt
new file mode 100644
index 0000000..506b422
--- /dev/null
+++ b/android-client/app/src/main/java/com/godeye/android/MainActivity.kt
@@ -0,0 +1,256 @@
+package com.godeye.android
+
+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 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
+
+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)
+ }
+
+ companion object {
+ private const val PERMISSION_REQUEST_CODE = 100
+ private val REQUIRED_PERMISSIONS = arrayOf(
+ Manifest.permission.CAMERA,
+ Manifest.permission.RECORD_AUDIO,
+ Manifest.permission.INTERNET,
+ Manifest.permission.ACCESS_NETWORK_STATE
+ )
+
+ 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)
+
+ checkPermissions()
+ }
+
+ 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()
+ }
+ }
+
+ override fun onRequestPermissionsResult(requestCode: Int, permissions: Array, 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()
+ }
+ }
+ }
+
+ 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"
+
+ 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("Ошибка запуска камеры")
+ }
+ }
+ } catch (e: Exception) {
+ Log.e("MainActivity", "Error starting camera", e)
+ socketManager.respondToCameraRequest(sessionId, false, null, e.message)
+ }
+ }
+ }
+
+ private fun handleCameraSwitch(sessionId: String, cameraType: String) {
+ runOnUiThread {
+ binding.tvCameraType.text = "Переключение на: $cameraType"
+ cameraManager.switchCamera(cameraType) { success ->
+ if (success) {
+ updateConnectionStatus("Камера переключена на $cameraType")
+ } else {
+ updateConnectionStatus("Ошибка переключения камеры")
+ }
+ }
+ }
+ }
+
+ private fun handleCameraDisconnect(sessionId: String) {
+ runOnUiThread {
+ cameraManager.stopCamera()
+ webRTCManager.endSession(sessionId)
+ updateConnectionStatus("Трансляция завершена")
+ binding.tvCameraType.text = ""
+ }
+ }
+
+ 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()
+ }
+}
\ No newline at end of file
diff --git a/android-client/app/src/main/res/drawable/ic_launcher_foreground.xml b/android-client/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..3626962
--- /dev/null
+++ b/android-client/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/android-client/app/src/main/res/layout/activity_main.xml b/android-client/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..ca64a44
--- /dev/null
+++ b/android-client/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android-client/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android-client/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..d570ea9
--- /dev/null
+++ b/android-client/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/android-client/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android-client/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..d570ea9
--- /dev/null
+++ b/android-client/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/android-client/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android-client/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..275f70a
Binary files /dev/null and b/android-client/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android-client/app/src/main/res/values/colors.xml b/android-client/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..bbde014
--- /dev/null
+++ b/android-client/app/src/main/res/values/colors.xml
@@ -0,0 +1,17 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
+
+ #E3F2FD
+ #212121
+ #F44336
+ #4CAF50
+
+
diff --git a/android-client/app/src/main/res/values/ic_launcher_background.xml b/android-client/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..f82414e
--- /dev/null
+++ b/android-client/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+ #3DDC84
+
+
diff --git a/android-client/app/src/main/res/values/strings.xml b/android-client/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..7301daf
--- /dev/null
+++ b/android-client/app/src/main/res/values/strings.xml
@@ -0,0 +1,14 @@
+
+ GodEye Signal Center
+ Необходимы разрешения
+ Для работы приложения необходим доступ к камере, микрофону и интернету
+ Запрос доступа к камере
+ Оператор %1$s запрашивает доступ к камере %2$s. Разрешить?
+ Разрешить
+ Отклонить
+ Подключение...
+ Подключено
+ Отключено
+ Ошибка
+
+
diff --git a/android-client/app/src/main/res/values/themes.xml b/android-client/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..757787e
--- /dev/null
+++ b/android-client/app/src/main/res/values/themes.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/android-client/app/src/main/res/xml/backup_rules.xml b/android-client/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..f033dd5
--- /dev/null
+++ b/android-client/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/android-client/app/src/main/res/xml/data_extraction_rules.xml b/android-client/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..bf1cf07
--- /dev/null
+++ b/android-client/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/android-client/build.gradle b/android-client/build.gradle
new file mode 100644
index 0000000..6cade04
--- /dev/null
+++ b/android-client/build.gradle
@@ -0,0 +1,24 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ ext.kotlin_version = "1.8.10"
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:8.1.2'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/android-client/build/reports/problems/problems-report.html b/android-client/build/reports/problems/problems-report.html
new file mode 100644
index 0000000..217cd2a
--- /dev/null
+++ b/android-client/build/reports/problems/problems-report.html
@@ -0,0 +1,663 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Gradle Configuration Cache
+
+
+
+
+
+
+ Loading...
+
+
+
+
+
+
+
diff --git a/android-client/gradle.properties b/android-client/gradle.properties
new file mode 100644
index 0000000..ddd6e8b
--- /dev/null
+++ b/android-client/gradle.properties
@@ -0,0 +1,16 @@
+# Project-wide Gradle settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+org.gradle.parallel=true
+org.gradle.caching=true
+
+# Android X settings
+android.useAndroidX=true
+android.enableJetifier=true
+
+# Kotlin code style
+kotlin.code.style=official
+
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
diff --git a/android-client/gradle/wrapper/gradle-wrapper.jar b/android-client/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..ccebba7
Binary files /dev/null and b/android-client/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/android-client/gradle/wrapper/gradle-wrapper.properties b/android-client/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0bd3e27
--- /dev/null
+++ b/android-client/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+
diff --git a/android-client/gradlew b/android-client/gradlew
new file mode 100755
index 0000000..c4f7fcc
--- /dev/null
+++ b/android-client/gradlew
@@ -0,0 +1,184 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or 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 UN*X
+##
+##############################################################################
+
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# 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 "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# 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/gradle/wrapper/gradle-wrapper.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" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if [ "$darwin" = "true" ]; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command
+set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/android-client/gradlew.bat b/android-client/gradlew.bat
new file mode 100644
index 0000000..b46392d
--- /dev/null
+++ b/android-client/gradlew.bat
@@ -0,0 +1,90 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+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
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.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 %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="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
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/android-client/local.properties b/android-client/local.properties
new file mode 100644
index 0000000..3b3fbe0
--- /dev/null
+++ b/android-client/local.properties
@@ -0,0 +1,8 @@
+## This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Sun Sep 28 22:05:10 KST 2025
+sdk.dir=/home/trevor/Android/Sdk
diff --git a/android-client/settings.gradle b/android-client/settings.gradle
new file mode 100644
index 0000000..1b6d332
--- /dev/null
+++ b/android-client/settings.gradle
@@ -0,0 +1,18 @@
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ }
+}
+rootProject.name = "GodEye Android Client"
+include ':app'
+
diff --git a/backend/god-eye.log b/backend/god-eye.log
index 52737a3..ed23c08 100644
--- a/backend/god-eye.log
+++ b/backend/god-eye.log
@@ -41,3 +41,29 @@
{"level":"info","message":"Client disconnected: QvuWwgAAfr7da037AAAb, reason: transport close","timestamp":"2025-09-28T12:55:14.412Z"}
{"level":"info","message":"Client disconnected: -PXCQgHNuhIzUo_yAAAZ, reason: transport close","timestamp":"2025-09-28T12:55:14.413Z"}
{"level":"info","message":"Client disconnected: kux60JRMHb6AaZ5gAAAD, reason: transport close","timestamp":"2025-09-28T12:55:22.414Z"}
+{"level":"info","message":"SIGINT received, shutting down gracefully","timestamp":"2025-09-28T13:07:35.870Z"}
+{"level":"info","message":"GodEye Backend Server running on port 3001","timestamp":"2025-09-28T13:07:39.141Z"}
+{"level":"info","message":"New connection: TOwjiXpkzAaNcww1AAAB","timestamp":"2025-09-28T13:07:43.327Z"}
+{"level":"info","message":"New connection: 8qm3SbgxALD2dYwXAAAD","timestamp":"2025-09-28T13:07:53.227Z"}
+{"level":"info","message":"New connection: 8fefWf4s5sF42BsoAAAF","timestamp":"2025-09-28T13:08:01.451Z"}
+{"androidVersion":"12","availableCameras":"back,front,ultra_wide,telephoto","level":"info","manufacturer":"Samsung","message":"Android client registered: demo-device-001","model":"Samsung Galaxy S21","timestamp":"2025-09-28T13:08:01.458Z"}
+{"level":"info","message":"New connection: xE6kR4i2_3ivGkOHAAAH","timestamp":"2025-09-28T13:08:11.250Z"}
+{"level":"info","message":"Operator registered: demo-operator-001","timestamp":"2025-09-28T13:08:11.254Z"}
+{"cameraType":"telephoto","deviceId":"demo-device-001","level":"info","message":"Camera request created: 44f00d25-73ff-430d-a1fe-8e15e6f2167d","operatorId":"demo-operator-001","timestamp":"2025-09-28T13:08:15.469Z"}
+{"level":"info","message":"Camera stream started: session 44f00d25-73ff-430d-a1fe-8e15e6f2167d","timestamp":"2025-09-28T13:08:28.966Z"}
+{"level":"info","message":"Client disconnected: xE6kR4i2_3ivGkOHAAAH, reason: client namespace disconnect","timestamp":"2025-09-28T13:08:33.734Z"}
+{"level":"info","message":"New connection: qsVHZRabY941fJ0kAAAJ","timestamp":"2025-09-28T13:08:34.347Z"}
+{"level":"info","message":"Operator registered: demo-operator-001","timestamp":"2025-09-28T13:08:34.352Z"}
+{"level":"info","message":"Client disconnected: 8qm3SbgxALD2dYwXAAAD, reason: transport close","timestamp":"2025-09-28T13:08:38.032Z"}
+{"level":"info","message":"Client disconnected: qsVHZRabY941fJ0kAAAJ, reason: transport close","timestamp":"2025-09-28T13:08:38.033Z"}
+{"level":"info","message":"Client disconnected: 8fefWf4s5sF42BsoAAAF, reason: transport close","timestamp":"2025-09-28T13:08:38.034Z"}
+{"level":"info","message":"New connection: RbkyqT0u0lZ8jim4AAAL","timestamp":"2025-09-28T13:08:38.103Z"}
+{"level":"info","message":"New connection: CXQg4YqyPRJm91MDAAAN","timestamp":"2025-09-28T13:08:40.620Z"}
+{"level":"info","message":"Operator registered: demo-operator-001","timestamp":"2025-09-28T13:08:40.624Z"}
+{"level":"info","message":"New connection: TxEB09fdUheTVAtXAAAP","timestamp":"2025-09-28T13:08:44.899Z"}
+{"androidVersion":"12","availableCameras":"back,front","level":"info","manufacturer":"Samsung","message":"Android client registered: demo-device-001","model":"Samsung Galaxy S21","timestamp":"2025-09-28T13:08:44.903Z"}
+{"cameraType":"back","deviceId":"demo-device-001","level":"info","message":"Camera request created: 73aafdc4-6336-4ed3-b44b-4dc95d123ee0","operatorId":"demo-operator-001","timestamp":"2025-09-28T13:08:51.455Z"}
+{"level":"info","message":"Camera stream started: session 73aafdc4-6336-4ed3-b44b-4dc95d123ee0","timestamp":"2025-09-28T13:08:55.206Z"}
+{"level":"info","message":"Session terminated: 73aafdc4-6336-4ed3-b44b-4dc95d123ee0","timestamp":"2025-09-28T13:10:08.919Z"}
+{"level":"info","message":"Client disconnected: CXQg4YqyPRJm91MDAAAN, reason: client namespace disconnect","timestamp":"2025-09-28T13:10:09.925Z"}
+{"level":"info","message":"Client disconnected: TxEB09fdUheTVAtXAAAP, reason: client namespace disconnect","timestamp":"2025-09-28T13:10:12.485Z"}