优化语言
This commit is contained in:
6
.idea/studiobot.xml
generated
Normal file
6
.idea/studiobot.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="StudioBotProjectSettings">
|
||||
<option name="shareContext" value="OptedOut" />
|
||||
</component>
|
||||
</project>
|
||||
1628
APP端API接口文档.md
Normal file
1628
APP端API接口文档.md
Normal file
File diff suppressed because it is too large
Load Diff
22
README.md
22
README.md
@@ -235,3 +235,25 @@ class ExampleActivity :
|
||||
## License
|
||||
|
||||
当前仓库暂未声明开源许可证。如需公开复用或分发,建议根据实际用途补充 LICENSE 文件。
|
||||
|
||||
|
||||
|
||||
别名: chengkong
|
||||
创建日期: 2026年5月6日
|
||||
条目类型: PrivateKeyEntry
|
||||
证书链长度: 1
|
||||
证书[1]:
|
||||
所有者: C=86, ST=ShanDong, L=RiZhao, O=ChengKong, OU=ChengKong, CN=ChengKong
|
||||
发布者: C=86, ST=ShanDong, L=RiZhao, O=ChengKong, OU=ChengKong, CN=ChengKong
|
||||
序列号: 1
|
||||
生效时间: Wed May 06 17:08:58 CST 2026, 失效时间: Sun Apr 30 17:08:58 CST 2051
|
||||
证书指纹:
|
||||
SHA1: B1:3A:DB:EA:42:E7:02:F8:FA:0A:71:A4:33:CD:42:CB:8A:6A:59:8E
|
||||
SHA256: FB:4F:3C:AA:03:C3:30:2A:14:21:C0:66:1F:78:72:70:35:2C:BB:3A:E9:81:68:44:5E:AA:3B:33:D1:B8:FE:99
|
||||
签名算法名称: SHA256withRSA
|
||||
主体公共密钥算法: 2048 位 RSA 密钥
|
||||
版本: 1
|
||||
|
||||
|
||||
|
||||
Android_JUMHABI 32c97984f1089eb5e85721ee39261650
|
||||
@@ -12,6 +12,13 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
|
||||
ndk {
|
||||
//设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
}
|
||||
|
||||
|
||||
applicationId "com.juhabi.birds"
|
||||
minSdk 24
|
||||
targetSdk 36
|
||||
@@ -21,6 +28,27 @@ android {
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file('../chengkong.jks')
|
||||
keyAlias 'chengkong'
|
||||
keyPassword '111111'
|
||||
storePassword '111111'
|
||||
}
|
||||
debug {
|
||||
storeFile file('../chengkong.jks')
|
||||
keyAlias 'chengkong'
|
||||
keyPassword '111111'
|
||||
storePassword '111111'
|
||||
}
|
||||
config {
|
||||
storeFile file('../chengkong.jks')
|
||||
keyAlias 'chengkong'
|
||||
keyPassword '111111'
|
||||
storePassword '111111'
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
@@ -82,4 +110,10 @@ dependencies {
|
||||
implementation 'com.makeramen:roundedimageview:2.3.0'
|
||||
//完整版引入
|
||||
implementation 'io.github.carguo:gsyvideoplayer:13.2.1'
|
||||
//高德相关
|
||||
//2D地图
|
||||
implementation 'com.amap.api:map2d:latest.integration'
|
||||
//定位
|
||||
implementation 'com.amap.api:location:latest.integration'
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,15 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
|
||||
<!--允许程序获取网络状态-->
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<!--允许程序访问WiFi网络信息-->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<!--允许程序访问CellID或WiFi热点来获取粗略的位置-->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="32" />
|
||||
@@ -26,6 +35,11 @@
|
||||
android:usesCleartextTraffic="true"
|
||||
android:theme="@style/Theme.KotMvpProject">
|
||||
|
||||
|
||||
<meta-data android:name="com.amap.api.v2.apikey"
|
||||
android:value="32c97984f1089eb5e85721ee39261650"/>
|
||||
|
||||
|
||||
<service
|
||||
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
|
||||
android:enabled="false"
|
||||
@@ -99,6 +113,10 @@
|
||||
android:name=".mine.WebviewActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".device.MapViewActivity"
|
||||
android:exported="false" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.amap.api.maps2d.MapView
|
||||
import com.juhabi.birds.R
|
||||
import com.juhabi.birds.base.BaseFragment
|
||||
import com.juhabi.birds.custom.AddDevicePopupWindow
|
||||
@@ -30,6 +31,8 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
private var currentPage = FIRST_PAGE
|
||||
private var pendingUnbindPosition: Int? = null
|
||||
|
||||
|
||||
|
||||
override fun createBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentHomeBinding {
|
||||
return FragmentHomeBinding.inflate(inflater, container, false)
|
||||
}
|
||||
@@ -95,13 +98,17 @@ class DeviceFragment : BaseFragment<FragmentHomeBinding, DevicePresenter>(),
|
||||
)
|
||||
}
|
||||
R.id.tv_show_map -> {
|
||||
val device = deviceAdapter.data[position]
|
||||
// 没有经纬度时只展示空态,不要把空坐标传给地图
|
||||
if (device.lat.isNullOrBlank() || device.lng.isNullOrBlank()) {
|
||||
showMessage(mContext.getString(R.string.i18n_080)) //暂无定位
|
||||
return@setOnItemChildClickListener
|
||||
}
|
||||
// 地图页后续接入,这里先预留点击入口
|
||||
//Todo 1.先查询定位权限,参考之前动态权限获取方式。2.跳转到MapViewActivity中,中心点则随便展示就行,可以默认北京天安门
|
||||
|
||||
|
||||
//代码不要删
|
||||
// val device = deviceAdapter.data[position]
|
||||
// // 没有经纬度时只展示空态,不要把空坐标传给地图
|
||||
// if (device.lat.isNullOrBlank() || device.lng.isNullOrBlank()) {
|
||||
// showMessage(mContext.getString(R.string.i18n_080)) //暂无定位
|
||||
// return@setOnItemChildClickListener
|
||||
// }
|
||||
// // 地图页后续接入,这里先预留点击入口
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
41
app/src/main/java/com/juhabi/birds/device/MapViewActivity.kt
Normal file
41
app/src/main/java/com/juhabi/birds/device/MapViewActivity.kt
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.juhabi.birds.device
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import com.juhabi.birds.base.BaseActivity
|
||||
import com.juhabi.birds.databinding.DeviceDetailLayoutBinding
|
||||
import com.juhabi.birds.databinding.MapviewLayoutBinding
|
||||
import com.juhabi.birds.device.entity.DeviceEntity
|
||||
import com.juhabi.birds.device.mvp.DeviceContract
|
||||
import com.juhabi.birds.device.mvp.DeviceImpl
|
||||
import com.juhabi.birds.device.mvp.DevicePresenter
|
||||
|
||||
/**
|
||||
* 地图显示
|
||||
*/
|
||||
class MapViewActivity :BaseActivity<MapviewLayoutBinding, DevicePresenter>(), DeviceContract.DeviceView,
|
||||
View.OnClickListener {
|
||||
override fun createBinding(inflater: LayoutInflater): MapviewLayoutBinding {
|
||||
return MapviewLayoutBinding.inflate(inflater)
|
||||
}
|
||||
|
||||
override fun createPresenter(): DevicePresenter? {
|
||||
return DevicePresenter(DeviceImpl(mContext), mContext)
|
||||
}
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
}
|
||||
|
||||
override fun showError(message: String) {
|
||||
}
|
||||
|
||||
override fun getBindDeviceListSuccess(devices: List<DeviceEntity>) {
|
||||
}
|
||||
|
||||
override fun bindDeviceSuccess(message: String) {
|
||||
}
|
||||
|
||||
override fun onClick(p0: View?) {
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ class DeviceAdapter : BaseQuickAdapter<DeviceEntity, BaseViewHolder>(R.layout.de
|
||||
|
||||
init {
|
||||
addChildClickViewIds(R.id.img_more)
|
||||
addChildClickViewIds(R.id.tv_show_map)
|
||||
}
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: DeviceEntity) {
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="@string/register_password_hint"
|
||||
|
||||
17
app/src/main/res/layout/mapview_layout.xml
Normal file
17
app/src/main/res/layout/mapview_layout.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.amap.api.maps2d.MapView
|
||||
|
||||
android:id="@+id/map"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="MissingClass" />
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user