阿里云依赖
This commit is contained in:
@@ -50,6 +50,9 @@ dependencies {
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.androidx.junit)
|
||||
androidTestImplementation(libs.androidx.espresso.core)
|
||||
// 添加阿里云移动推送核心SDK
|
||||
implementation("com.aliyun.ams:alicloud-android-push:3.8.2")
|
||||
implementation("com.aliyun.dpa:oss-android-sdk:2.9.21")
|
||||
implementation("de.hdodenhof:circleimageview:3.1.0")
|
||||
// Retrofit
|
||||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.DefenseApplication">
|
||||
<activity
|
||||
android:name=".liveVideo.WiFiManagementActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".liveVideo.LinkedUserActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".liveVideo.DeviceInfoActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".liveVideo.AutoModeActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.example.defenseapplication.liveVideo
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.example.defenseapplication.R
|
||||
import com.example.defenseapplication.databinding.AlarmLogActivityBinding
|
||||
import com.example.defenseapplication.databinding.DeviceInfoActivityBinding
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
|
||||
class DeviceInfoActivity : AppCompatActivity() {
|
||||
private lateinit var binding: DeviceInfoActivityBinding
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = DeviceInfoActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(binding.topBar)
|
||||
.init()
|
||||
binding.ivBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.example.defenseapplication.liveVideo
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.example.defenseapplication.R
|
||||
import com.example.defenseapplication.databinding.DeviceInfoActivityBinding
|
||||
import com.example.defenseapplication.databinding.LinkedUserActivityBinding
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
|
||||
class LinkedUserActivity : AppCompatActivity() {
|
||||
private lateinit var binding: LinkedUserActivityBinding
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = LinkedUserActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(binding.topBar)
|
||||
.init()
|
||||
binding.ivBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,10 @@ class SettingsActivity : BaseActivity() {
|
||||
val intent = Intent(this, AutoModeActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
binding.itemDeviceInfo.setOnClickListener {
|
||||
val intent = Intent(this, DeviceInfoActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.example.defenseapplication.liveVideo
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.example.defenseapplication.R
|
||||
import com.example.defenseapplication.databinding.DeviceInfoActivityBinding
|
||||
import com.example.defenseapplication.databinding.LinkedUserActivityBinding
|
||||
import com.example.defenseapplication.databinding.WifiManagementActivityBinding
|
||||
import com.gyf.immersionbar.ImmersionBar
|
||||
|
||||
class WiFiManagementActivity : AppCompatActivity() {
|
||||
private lateinit var binding: WifiManagementActivityBinding
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
binding = WifiManagementActivityBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(binding.topBar)
|
||||
.init()
|
||||
binding.ivBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
91
app/src/main/res/layout/device_info_activity.xml
Normal file
91
app/src/main/res/layout/device_info_activity.xml
Normal file
@@ -0,0 +1,91 @@
|
||||
<?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-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".liveVideo.DeviceInfoActivity">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/device_info"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
<!-- 设备型号 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/device_model"
|
||||
android:textSize="14dp"/>
|
||||
|
||||
<TextView
|
||||
android:text="VDF-2000-A1"
|
||||
android:textColor="@color/gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/auto_arms_start_time"
|
||||
android:textSize="14dp"/>
|
||||
|
||||
<TextView
|
||||
android:text="VDF20260318001759"
|
||||
android:textColor="@color/gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/auto_arms_end_time"
|
||||
android:textSize="14dp"/>
|
||||
|
||||
<TextView
|
||||
android:text="20261015-build1008"
|
||||
android:textColor="@color/gray"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
36
app/src/main/res/layout/linked_user_activity.xml
Normal file
36
app/src/main/res/layout/linked_user_activity.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".liveVideo.LinkedUserActivity">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/linked_user"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -200,7 +200,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:text="@string/settings"
|
||||
android:text="@string/basic_settings"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="14dp" />
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/about"
|
||||
android:text="@string/device_info"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp" />
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/user_management"
|
||||
android:text="@string/linked_user"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp" />
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/wifi"
|
||||
android:text="@string/wiFi_management"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp" />
|
||||
|
||||
|
||||
36
app/src/main/res/layout/wifi_management_activity.xml
Normal file
36
app/src/main/res/layout/wifi_management_activity.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".liveVideo.WiFiManagementActivity">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/wiFi_management"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16dp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -165,6 +165,7 @@
|
||||
<!-- Settings -->
|
||||
<string name="settings_title">设置</string>
|
||||
<string name="function_settings">功能设置</string>
|
||||
<string name="basic_settings">基本设置</string>
|
||||
<string name="voice_settings">语音设置</string>
|
||||
<string name="water_gun_settings">水枪设置</string>
|
||||
<string name="detection_settings">自动模式</string>
|
||||
@@ -172,6 +173,8 @@
|
||||
<string name="language_settings">语言</string>
|
||||
<string name="chinese">中文</string>
|
||||
<string name="english">English</string>
|
||||
<string name="linked_user">关联用户</string>
|
||||
<string name="wiFi_management">WiFi管理</string>
|
||||
<string name="about">关于</string>
|
||||
<string name="version">版本</string>
|
||||
<string name="logout">退出登录</string>
|
||||
@@ -194,6 +197,10 @@
|
||||
<string name="auto_mode_notice">自动模式须知</string>
|
||||
<string name="know_and_agree">知晓并同意</string>
|
||||
<string name="auto_mode_notice_content">开启全自动模式后,设备/系统将自主运行、自动执行预设流程,无需人工手动干预操作。运行期间请勿随意断电、强制重启、遮挡感应部件或私自拆解设备,避免程序异常、运行中断。全自动模式仅适用于标准常规场景,特殊工况、异常环境、临时特殊需求下,请手动切换至人工模式操作。系统会自动识别常规状态并自适应调节,若出现报警、卡顿、异常提示等故障,需立即暂停全自动模式,排查问题后再重启使用。严禁在全自动运行范围内放置杂物、危险品,保持作业区域整洁通畅,防止设备碰撞、卡滞、安全事故发生。全自动模式运行数据、执行记录将自动留存,请勿随意删除或篡改系统配置参数,避免运行逻辑错乱。日常需定期检查设备状态、电量、电量、网络及硬件损耗,保障全自动模式稳定长效运行。未成年人、无关人员禁止触碰操作全自动模式开关及设置面板,无关人员禁止触碰操作全自动模式开关及设置面板,防止误操作引发故障与风险。</string>
|
||||
<string name="device_info">设备信息</string>
|
||||
<string name="device_model">设备型号</string>
|
||||
<string name="auto_arms_start_time">自动布防开始时间</string>
|
||||
<string name="auto_arms_end_time">自动布防结束时间</string>
|
||||
|
||||
|
||||
<!-- Personal Profile -->
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
<!-- Settings -->
|
||||
<string name="settings_title">Settings</string>
|
||||
<string name="function_settings">Function Settings</string>
|
||||
<string name="basic_settings">Basic Settings</string>
|
||||
<string name="voice_settings">Voice Settings</string>
|
||||
<string name="water_gun_settings">Water Gun Settings</string>
|
||||
<string name="detection_settings">Auto Mode</string>
|
||||
@@ -162,6 +163,8 @@
|
||||
<string name="language_settings">Language</string>
|
||||
<string name="chinese">Chinese</string>
|
||||
<string name="english">English</string>
|
||||
<string name="linked_user">Linked User</string>
|
||||
<string name="wiFi_management">WiFi Management</string>
|
||||
<string name="about">About</string>
|
||||
<string name="version">Version</string>
|
||||
<string name="logout">Logout</string>
|
||||
@@ -169,6 +172,12 @@
|
||||
<string name="warning_voice_playback">Warning Voice Playback</string>
|
||||
<string name="warning_voice_content">Warning Voice Content</string>
|
||||
<string name="enter_warning_voice_content_system_will_generate_voice_automatically">Enter warning voice content, system will generate voice automatically.</string>
|
||||
<string name="device_info">Device info</string>
|
||||
<string name="device_model">Device model</string>
|
||||
<string name="auto_arms_start_time">Auto arm start time</string>
|
||||
<string name="auto_arms_end_time">Auto arm End time</string>
|
||||
|
||||
|
||||
<!-- Personal Profile -->
|
||||
<string name="avatar">Avatar</string>
|
||||
<string name="gender">Gender</string>
|
||||
@@ -343,6 +352,7 @@
|
||||
<string name="know_and_agree">I have read and agree</string>
|
||||
<string name="auto_mode_notice_content">After enabling Full Auto Mode, the device/system will operate independently and automatically execute preset procedures without manual intervention.During operation, do not arbitrarily power off, force a restart, block sensor components or disassemble the device privately, so as to avoid program abnormalities and operation interruption. Full Auto Mode is only applicable to standard and conventional scenarios. Under special working conditions, abnormal environments or temporary special requirements, please manually switch to manual mode.The system will automatically identify normal status and make adaptive adjustments. In case of faults such as alarms, stuttering or abnormal prompts, immediately pause Full Auto Mode, troubleshoot the problem before restarting.Do not place sundries or dangerous goods within the automatic operation range. Keep the working area clean and unobstructed to prevent equipment collision, jamming and safety accidents.Operation data and execution records of Full Auto Mode will be automatically saved. Do not arbitrarily delete or tamper with system configuration parameters to avoid operational logic disorder.Check the device status, power level, network connection and hardware loss regularly on a daily basis to ensure stable and long-term operation of Full Auto Mode. Minors and irrelevant personnel are prohibited from touching or operating the Full Auto Mode switch and setting panel to prevent malfunctions and risks caused by misoperation.</string>
|
||||
|
||||
|
||||
<string name="device_running_days">Device has been running for %d days, please maintain in time</string>
|
||||
<string name="device_offline_message">Device is offline, please check the WiFi and power connection</string>
|
||||
<string name="countdown_retry">%ds retry</string>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven(url = "https://maven.aliyun.com/repository/gradle-plugin")
|
||||
gradlePluginPortal()
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
@@ -19,6 +21,7 @@ dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven(url = "https://maven.aliyun.com/repository/public/")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user