android app
This commit is contained in:
BIN
android-client/.gradle/9.0-milestone-1/checksums/checksums.lock
Normal file
BIN
android-client/.gradle/9.0-milestone-1/checksums/checksums.lock
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.
BIN
android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.bin
Normal file
BIN
android-client/.gradle/9.0-milestone-1/fileHashes/fileHashes.bin
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
#Sun Sep 28 22:04:42 KST 2025
|
||||||
|
gradle.version=9.0-milestone-1
|
||||||
BIN
android-client/.gradle/buildOutputCleanup/outputFiles.bin
Normal file
BIN
android-client/.gradle/buildOutputCleanup/outputFiles.bin
Normal file
Binary file not shown.
2
android-client/.gradle/config.properties
Normal file
2
android-client/.gradle/config.properties
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#Sun Sep 28 22:05:42 KST 2025
|
||||||
|
java.home=/snap/android-studio/205/jbr
|
||||||
0
android-client/.gradle/vcs-1/gc.properties
Normal file
0
android-client/.gradle/vcs-1/gc.properties
Normal file
9
android-client/.run/app.run.xml
Normal file
9
android-client/.run/app.run.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<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>
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
68
android-client/app/build.gradle
Normal file
68
android-client/app/build.gradle
Normal file
@@ -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'
|
||||||
|
}
|
||||||
29
android-client/app/proguard-rules.pro
vendored
Normal file
29
android-client/app/proguard-rules.pro
vendored
Normal file
@@ -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.**
|
||||||
41
android-client/app/src/main/AndroidManifest.xml
Normal file
41
android-client/app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<!-- Permissions -->
|
||||||
|
<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.MODIFY_AUDIO_SETTINGS" />
|
||||||
|
|
||||||
|
<!-- Hardware features -->
|
||||||
|
<uses-feature android:name="android.hardware.camera" android:required="true" />
|
||||||
|
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
||||||
|
<uses-feature android:name="android.hardware.microphone" android:required="true" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:supportsRtl="true"
|
||||||
|
android:theme="@style/Theme.GodEye"
|
||||||
|
android:usesCleartextTraffic="true"
|
||||||
|
tools:targetApi="31">
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
||||||
@@ -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<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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<path android:fillColor="#26A69A"
|
||||||
|
android:pathData="M0,0h108v108h-108z"/>
|
||||||
|
<path android:fillColor="#ffffff"
|
||||||
|
android:pathData="M54,30c-13.3,0 -24,10.7 -24,24s10.7,24 24,24s24,-10.7 24,-24S67.3,30 54,30zM54,70c-8.8,0 -16,-7.2 -16,-16s7.2,-16 16,-16s16,7.2 16,16S62.8,70 54,70z"/>
|
||||||
|
<path android:fillColor="#ffffff"
|
||||||
|
android:pathData="M54,38c-8.8,0 -16,7.2 -16,16s7.2,16 16,16s16,-7.2 16,-16S62.8,38 54,38zM54,62c-4.4,0 -8,-3.6 -8,-8s3.6,-8 8,-8s8,3.6 8,8S58.4,62 54,62z"/>
|
||||||
|
</vector>
|
||||||
|
|
||||||
92
android-client/app/src/main/res/layout/activity_main.xml
Normal file
92
android-client/app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
<?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"
|
||||||
|
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">
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
|
</adaptive-icon>
|
||||||
|
|
||||||
BIN
android-client/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
android-client/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 164 B |
17
android-client/app/src/main/res/values/colors.xml
Normal file
17
android-client/app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
|
<color name="purple_500">#FF6200EE</color>
|
||||||
|
<color name="purple_700">#FF3700B3</color>
|
||||||
|
<color name="teal_200">#FF03DAC5</color>
|
||||||
|
<color name="teal_700">#FF018786</color>
|
||||||
|
<color name="black">#FF000000</color>
|
||||||
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
|
||||||
|
<!-- Custom colors -->
|
||||||
|
<color name="status_background">#E3F2FD</color>
|
||||||
|
<color name="video_background">#212121</color>
|
||||||
|
<color name="error_color">#F44336</color>
|
||||||
|
<color name="success_color">#4CAF50</color>
|
||||||
|
</resources>
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#3DDC84</color>
|
||||||
|
</resources>
|
||||||
|
|
||||||
14
android-client/app/src/main/res/values/strings.xml
Normal file
14
android-client/app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<resources>
|
||||||
|
<string name="app_name">GodEye Signal Center</string>
|
||||||
|
<string name="permission_denied_title">Необходимы разрешения</string>
|
||||||
|
<string name="permission_denied_message">Для работы приложения необходим доступ к камере, микрофону и интернету</string>
|
||||||
|
<string name="camera_request_title">Запрос доступа к камере</string>
|
||||||
|
<string name="camera_request_message">Оператор %1$s запрашивает доступ к камере %2$s. Разрешить?</string>
|
||||||
|
<string name="allow">Разрешить</string>
|
||||||
|
<string name="deny">Отклонить</string>
|
||||||
|
<string name="connecting">Подключение...</string>
|
||||||
|
<string name="connected">Подключено</string>
|
||||||
|
<string name="disconnected">Отключено</string>
|
||||||
|
<string name="error">Ошибка</string>
|
||||||
|
</resources>
|
||||||
|
|
||||||
18
android-client/app/src/main/res/values/themes.xml
Normal file
18
android-client/app/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?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>
|
||||||
|
<!-- Secondary brand color. -->
|
||||||
|
<item name="colorSecondary">@color/teal_200</item>
|
||||||
|
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||||
|
<item name="colorOnSecondary">@color/black</item>
|
||||||
|
<!-- Status bar color. -->
|
||||||
|
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
|
|
||||||
6
android-client/app/src/main/res/xml/backup_rules.xml
Normal file
6
android-client/app/src/main/res/xml/backup_rules.xml
Normal file
@@ -0,0 +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"/>
|
||||||
|
</full-backup-content>
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<paths>
|
||||||
|
<external-files-path name="external_files" path="."/>
|
||||||
|
</paths>
|
||||||
|
</resources>
|
||||||
|
|
||||||
24
android-client/build.gradle
Normal file
24
android-client/build.gradle
Normal file
@@ -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
|
||||||
|
}
|
||||||
663
android-client/build/reports/problems/problems-report.html
Normal file
663
android-client/build/reports/problems/problems-report.html
Normal file
File diff suppressed because one or more lines are too long
16
android-client/gradle.properties
Normal file
16
android-client/gradle.properties
Normal file
@@ -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
|
||||||
BIN
android-client/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
android-client/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
android-client/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
android-client/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -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
|
||||||
|
|
||||||
184
android-client/gradlew
vendored
Executable file
184
android-client/gradlew
vendored
Executable file
@@ -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" "$@"
|
||||||
90
android-client/gradlew.bat
vendored
Normal file
90
android-client/gradlew.bat
vendored
Normal file
@@ -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
|
||||||
8
android-client/local.properties
Normal file
8
android-client/local.properties
Normal file
@@ -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
|
||||||
18
android-client/settings.gradle
Normal file
18
android-client/settings.gradle
Normal file
@@ -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'
|
||||||
|
|
||||||
@@ -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: 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: -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":"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"}
|
||||||
|
|||||||
Reference in New Issue
Block a user