Merge branch 'develop_sky_liyi' into 'canary_release_sky'

Develop sky liyi

See merge request StarlockTeam/app-starlock!158
This commit is contained in:
李仪 2025-06-10 02:42:30 +00:00
commit ba2fb28018
19 changed files with 303 additions and 57 deletions

View File

@ -67,8 +67,12 @@ variables:
# - flutter pub get
- export PATH="/opt/homebrew/bin:$PATH"
- eval "$(rbenv init -)"
- bundle config mirror.https://rubygems.org https://gems.ruby-china.com
- bundle install --gemfile android/Gemfile --quiet
- rbenv global 2.6.10 # 你实际用的 Ruby 版本
- ruby -v
- which ruby
- gem env
- bundle config mirror.https://rubygems.org https://mirrors.aliyun.com/rubygems/
- bundle install --gemfile android/Gemfile --path vendor/bundle_android --quiet
cache:
paths:
- app_new.version
@ -80,11 +84,14 @@ variables:
- export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
- ls -li
- export NEXT_VERSION="$(cat app_new.version)"
# - flutter pub get
- export PATH="/opt/homebrew/bin:$PATH"
- eval "$(rbenv init -)"
- bundle config mirror.https://rubygems.org https://gems.ruby-china.com
- bundle install --gemfile ios/Gemfile --quiet
- rbenv global 2.6.10 # 你实际用的 Ruby 版本
- ruby -v
- which ruby
- gem env
- bundle config mirror.https://rubygems.org https://mirrors.aliyun.com/rubygems/
- bundle install --gemfile ios/Gemfile --path vendor/bundle_ios --quiet
cache:
paths:
- app_new.version

View File

@ -358,8 +358,14 @@ dependencies {
implementation 'com.umeng.umsdk:asms:1.8.5'
//</cn>
//<com>
implementation 'cn.jiguang.sdk.plugin:fcm:5.2.3'
implementation 'com.google.firebase:firebase-messaging:23.0.5'
// implementation 'cn.jiguang.sdk.plugin:fcm:5.2.3'
// implementation 'com.google.firebase:firebase-messaging:23.0.5'
//</com>
//FCM云消息与极光FCM插件
implementation 'com.google.firebase:firebase-messaging:23.2.1'
implementation 'cn.jiguang.sdk.plugin:fcm:5.2.2'
}

BIN
images/guide/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/guide/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
images/guide/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
images/guide/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -60,6 +60,7 @@ import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/t
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart';
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_page.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
import 'package:star_lock/talk/starChart/views/guide/permission_guidance_page.dart';
import 'package:star_lock/talk/starChart/views/native/talk_view_native_decode_page.dart';
import 'package:star_lock/talk/starChart/views/talkView/talk_view_page.dart';
import 'package:star_lock/talk/starChart/webView/h264_web_view.dart';
@ -518,6 +519,8 @@ abstract class Routers {
static const String h264WebView = '/h264WebView'; //
static const String imageTransmissionView =
'/imageTransmissionView'; //()
static const String permissionGuidancePage =
'/permissionGuidancePage'; //
}
abstract class AppRouters {
@ -1194,6 +1197,10 @@ abstract class AppRouters {
GetPage<dynamic>(
name: Routers.imageTransmissionView,
page: () => ImageTransmissionPage()),
GetPage<dynamic>(
name: Routers.permissionGuidancePage,
page: () => PermissionGuidancePage()),
//
// GetPage<dynamic>(name: Routers.h264WebView, page: () => H264WebView()), // webview播放页面
];

View File

@ -128,6 +128,15 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage>
//
Widget keyTimeLimitWidget() {
//
DateTime now = DateTime.now();
//
int year = now.year;
int month = now.month;
int day = now.day;
int hour = now.hour;
int minute = now.minute;
return Column(
children: <Widget>[
Obx(() => CommonItem(
@ -139,6 +148,13 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage>
final PDuration selectDate = PDuration.parse(
DateTime.tryParse(state.timeLimitBeginTime.value));
Pickers.showDatePicker(context,
minDate: PDuration(
year: year,
month: month,
day: day,
hour: hour,
minute: minute,
),
selectDate: selectDate,
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
state.timeLimitBeginTime.value =
@ -153,6 +169,13 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage>
final PDuration selectDate = PDuration.parse(
DateTime.tryParse(state.timeLimitEndTime.value));
Pickers.showDatePicker(context,
minDate: PDuration(
year: year,
month: month,
day: day,
hour: hour,
minute: minute,
),
selectDate: selectDate,
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
state.timeLimitEndTime.value =

View File

@ -4,7 +4,9 @@ import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:star_lock/appRouters.dart';
import 'package:star_lock/app_settings/app_settings.dart';
import 'package:star_lock/main/lockMian/entity/lockListInfo_entity.dart';
import 'package:star_lock/talk/starChart/constant/message_type_constant.dart';
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
import 'package:star_lock/talk/starChart/entity/scp_message.dart';
@ -16,6 +18,8 @@ import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
import 'package:star_lock/talk/starChart/proto/talk_expect.pb.dart';
import 'package:star_lock/talk/starChart/views/talkView/talk_view_logic.dart';
import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart';
import 'package:star_lock/tools/commonDataManage.dart';
import 'package:star_lock/tools/storage.dart';
import '../../star_chart_manage.dart';
@ -32,10 +36,14 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
}
@override
void handleResp(ScpMessage scpMessage) {
void handleResp(ScpMessage scpMessage) async {
//
final TalkExpectResp talkExpectResp = scpMessage.Payload;
if (talkExpectResp != null) {
//
//test:使
playRingtone();
// print('收到预期音视频数据回复,scpMessage:$scpMessage');
//
startChartManage.stopTalkExpectMessageTimer();
@ -45,7 +53,7 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
startChartManage.rotateAngle = talkExpectResp.rotate;
startChartManage.videoWidth = talkExpectResp.width;
startChartManage.videoHeight = talkExpectResp.height;
AppLog.log('视频画面需要旋转:${talkExpectResp.rotate},画面宽高:${talkExpectResp.width}-${talkExpectResp.height}');
//
// x秒内没有收到通话保持则执行的操作;
talkePingOverTimeTimerManager.start();
@ -59,6 +67,50 @@ class UdpTalkExpectHandler extends ScpMessageBaseHandle
// ping
startChartManage.startTalkPingMessageTimer();
}
AppLog.log(
'视频画面需要旋转:${talkExpectResp.rotate},画面宽高:${talkExpectResp.width}-${talkExpectResp.height}');
//
final LockListInfoItemEntity currentKeyInfo =
CommonDataManage().currentKeyInfo;
// 0wifi保活 1wifi不保活图传 2wifi不保活可视对讲
var isWifiLockType = currentKeyInfo.lockFeature?.wifiLockType == 1;
final LockListInfoGroupEntity? lockListInfoGroupEntity =
await Storage.getLockMainListData();
if (lockListInfoGroupEntity != null) {
lockListInfoGroupEntity!.groupList?.forEach((element) {
final lockList = element.lockList;
if (lockList != null && lockList.length != 0) {
for (var lockInfo in lockList) {
final peerId = lockInfo.network?.peerId;
if (peerId != null && peerId != '') {
if (peerId == scpMessage.FromPeerId) {
isWifiLockType = lockInfo.lockFeature?.wifiLockType == 1;
}
}
}
}
});
}
if (isWifiLockType ||
(talkExpectResp.rotate == 0 &&
talkExpectResp.width == 640 &&
talkExpectResp.height == 480)) {
Get.toNamed(Routers.imageTransmissionView);
return;
}
if (startChartManage
.getDefaultTalkExpect()
.videoType
.contains(VideoTypeE.H264)) {
Get.toNamed(
Routers.h264WebView,
);
} else {
Get.toNamed(
Routers.starChartTalkView,
);
}
}
}

View File

@ -90,52 +90,10 @@ class UdpTalkRequestHandler extends ScpMessageBaseHandle
}) async {
//
_handleRequestSendExpect(lockPeerID: lockPeerID);
//
//test:使
playRingtone();
//
// _showTalkRequestNotification(talkObjectName: talkObjectName);
//
talkStatus.setPassiveCallWaitingAnswer();
//
final LockListInfoItemEntity currentKeyInfo =
CommonDataManage().currentKeyInfo;
var isWifiLockType = currentKeyInfo.lockFeature?.wifiLockType == 1;
final LockListInfoGroupEntity? lockListInfoGroupEntity =
await Storage.getLockMainListData();
if (lockListInfoGroupEntity != null) {
lockListInfoGroupEntity!.groupList?.forEach((element) {
final lockList = element.lockList;
if (lockList != null && lockList.length != 0) {
for (var lockInfo in lockList) {
final peerId = lockInfo.network?.peerId;
if (peerId != null && peerId != '') {
if (peerId == lockPeerID) {
isWifiLockType = lockInfo.lockFeature?.wifiLockType == 1;
}
}
}
}
});
}
if (isWifiLockType) {
Get.toNamed(Routers.imageTransmissionView);
return;
}
if (startChartManage
.getDefaultTalkExpect()
.videoType
.contains(VideoTypeE.H264)) {
Get.toNamed(
Routers.h264WebView,
);
} else {
Get.toNamed(
Routers.starChartTalkView,
);
}
}
//

View File

@ -0,0 +1,3 @@
import 'package:star_lock/tools/baseGetXController.dart';
class PermissionGuidanceLogic extends BaseGetXController {}

View File

@ -0,0 +1,109 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/tools/titleAppBar.dart';
class PermissionGuidancePage extends StatefulWidget {
const PermissionGuidancePage({Key? key}) : super(key: key);
@override
State<PermissionGuidancePage> createState() => _PermissionGuidancePageState();
}
class _PermissionGuidancePageState extends State<PermissionGuidancePage> {
final PageController _pageController = PageController();
int _currentPage = 0;
final List<Map<String, String>> _stepsData = [
{
'image': 'images/guide/1.png',
'text': '步骤1打开应用信息点击通知管理选项',
},
{
'image': 'images/guide/2.png',
'text': '步骤2下滑点击呼叫提醒的通知选项',
},
{
'image': 'images/guide/3.png',
'text': '步骤3选择在锁定屏幕上的选项设置',
},
{
'image': 'images/guide/4.png',
'text': '步骤4设置为显示通知及其内容',
},
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: TitleAppBar(
barTitle: '锁屏通知开启方式'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
backAction: () {
Get.back();
},
),
body: Column(
children: [
Expanded(
child: PageView.builder(
controller: _pageController,
onPageChanged: (index) {
setState(() {
_currentPage = index;
});
},
itemCount: _stepsData.length,
itemBuilder: (context, index) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
_stepsData[index]['image']!,
width: 1.sw,
height: 0.55.sh,
fit: BoxFit.contain,
),
SizedBox(height: 32.h),
Text(
_stepsData[index]['text']!,
style: TextStyle(fontSize: 28.sp),
textAlign: TextAlign.center,
),
],
);
},
),
),
SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List.generate(_stepsData.length, (index) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 4),
width: 10,
height: 10,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: _currentPage == index
? AppColors.mainColor
: Colors.grey[300],
),
);
}),
),
SizedBox(height: 24),
],
),
);
}
@override
void dispose() {
_pageController.dispose();
super.dispose();
}
}

View File

@ -0,0 +1,3 @@
class PermissionGuidanceState {
}

View File

@ -1,6 +1,9 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/appRouters.dart';
import 'package:star_lock/app_settings/app_colors.dart';
import 'package:star_lock/talk/call/callTalk.dart';
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
@ -52,18 +55,42 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
super.dispose();
}
String handlerAppBarTitle() {
if (startChartManage.rotateAngle == 0 &&
startChartManage.videoWidth == 640 &&
startChartManage.videoHeight == 480) {
return '';
}
return '图传'.tr;
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
resizeToAvoidBottomInset: false,
appBar: TitleAppBar(
barTitle: '图传'.tr,
barTitle: handlerAppBarTitle(),
haveBack: true,
backgroundColor: AppColors.mainColor,
backAction: () {
logic.udpHangUpAction();
},
actionsList: [
Visibility(
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
child: IconButton(
icon: Icon(
Icons.notification_add_sharp,
size: 32.w,
color: Colors.white,
),
onPressed: () {
Get.toNamed(Routers.permissionGuidancePage);
},
),
)
],
),
body: Obx(() => Column(
children: [
@ -124,7 +151,7 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
borderRadius: BorderRadius.circular(30.h),
child: Container(
width: barWidth,
height: double.infinity,
// height: double.infinity,
child: RotatedBox(
quarterTurns: startChartManage.rotateAngle ~/ 90,
child: RawImage(

View File

@ -13,6 +13,7 @@ import 'package:star_lock/talk/starChart/constant/talk_status.dart';
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
import 'package:star_lock/translations/current_locale_tool.dart';
import '../../../../tools/storage.dart';
@ -91,4 +92,7 @@ class ImageTransmissionState{
RxBool hasAudioData = false.obs; //
RxInt lastAudioTimestamp = 0.obs; //
Rx<ui.Image?> currentImage = Rx<ui.Image?>(null);
RxString currentLanguage =
CurrentLocaleTool.getCurrentLocaleString().obs; //
}

View File

@ -9,6 +9,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
import 'package:provider/provider.dart';
import 'package:star_lock/appRouters.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/talk/call/callTalk.dart';
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
@ -332,9 +333,10 @@ class _TalkViewNativeDecodePageState extends State<TalkViewNativeDecodePage>
color: state.currentQuality.value == q
? AppColors.mainColor
: Colors.black,
fontWeight: state.currentQuality.value == q
? FontWeight.bold
: FontWeight.normal,
fontWeight:
state.currentQuality.value == q
? FontWeight.bold
: FontWeight.normal,
fontSize: 28.sp,
),
),
@ -350,9 +352,27 @@ class _TalkViewNativeDecodePageState extends State<TalkViewNativeDecodePage>
);
},
child: Container(
child: Icon(Icons.high_quality_outlined, color: Colors.white, size: 38.w),
child: Icon(Icons.high_quality_outlined,
color: Colors.white, size: 38.w),
),
),
Visibility(
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
child: SizedBox(width: 38.w),
),
Visibility(
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
child: IconButton(
icon: Icon(
Icons.notification_add_sharp,
size: 32.w,
color: Colors.white,
),
onPressed: () {
Get.toNamed(Routers.permissionGuidancePage);
},
),
)
]);
}

View File

@ -15,6 +15,7 @@ import 'package:star_lock/talk/starChart/handle/other/packet_loss_statistics.dar
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
import 'package:star_lock/translations/current_locale_tool.dart';
import 'package:video_decode_plugin/video_decode_plugin.dart';
import '../../../../tools/storage.dart';
@ -120,4 +121,7 @@ class TalkViewNativeDecodeState {
// '高清'
RxString currentQuality = '高清'.obs; //
RxString currentLanguage =
CurrentLocaleTool.getCurrentLocaleString().obs; //
}

View File

@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'package:flutter/material.dart';
@ -7,6 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
import 'package:provider/provider.dart';
import 'package:star_lock/appRouters.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/talk/call/callTalk.dart';
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
@ -405,6 +407,23 @@ class _TalkViewPageState extends State<TalkViewPage>
image: const AssetImage('images/main/icon_lockDetail_rectangle.png'),
),
),
Visibility(
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
child: SizedBox(width: 38.w),
),
Visibility(
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
child: IconButton(
icon: Icon(
Icons.notification_add_sharp,
size: 32.w,
color: Colors.white,
),
onPressed: () {
Get.toNamed(Routers.permissionGuidancePage);
},
),
)
]);
}

View File

@ -13,6 +13,7 @@ import 'package:star_lock/talk/starChart/constant/talk_status.dart';
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
import 'package:star_lock/translations/current_locale_tool.dart';
import '../../../../tools/storage.dart';
@ -91,4 +92,7 @@ class TalkViewState {
RxBool hasAudioData = false.obs; //
RxInt lastAudioTimestamp = 0.obs; //
Rx<ui.Image?> currentImage = Rx<ui.Image?>(null);
RxString currentLanguage =
CurrentLocaleTool.getCurrentLocaleString().obs; //
}