From 6de0fa781cdc41ec3a26d001fe1cf35f4c4036c3 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 12 May 2022 16:50:30 +0800 Subject: [PATCH] for merge --- android_doc.md | 357 ------------------ .gitattributes => flutter/.gitattributes | 0 .gitignore => flutter/.gitignore | 0 .metadata => flutter/.metadata | 0 {android => flutter/android}/.gitignore | 0 {android => flutter/android}/app/build.gradle | 0 .../android}/app/google-services.json | 0 .../app/src/debug/AndroidManifest.xml | 0 .../android}/app/src/main/AndroidManifest.xml | 0 .../com/carriez/flutter_hbb/BootReceiver.kt | 0 .../com/carriez/flutter_hbb/InputService.kt | 0 .../com/carriez/flutter_hbb/MainActivity.kt | 0 .../com/carriez/flutter_hbb/MainService.kt | 0 .../kotlin/com/carriez/flutter_hbb/common.kt | 0 .../res/drawable-v21/launch_background.xml | 0 .../app/src/main/res/drawable/check_blue.xml | 0 .../app/src/main/res/drawable/close_red.xml | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../app/src/main/res/values-night/styles.xml | 0 .../app/src/main/res/values/colors.xml | 0 .../app/src/main/res/values/strings.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../res/xml/accessibility_service_config.xml | 0 .../app/src/profile/AndroidManifest.xml | 0 {android => flutter/android}/build.gradle | 0 .../android}/flutter_hbb_android.iml | 0 .../android}/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 {android => flutter/android}/key.jks | Bin {android => flutter/android}/settings.gradle | 0 {assets => flutter/assets}/android.png | Bin {assets => flutter/assets}/gestures.ttf | Bin {assets => flutter/assets}/insecure.png | Bin {assets => flutter/assets}/insecure_relay.png | Bin {assets => flutter/assets}/linux.png | Bin {assets => flutter/assets}/mac.png | Bin {assets => flutter/assets}/secure.png | Bin {assets => flutter/assets}/secure_relay.png | Bin {assets => flutter/assets}/win.png | Bin build_android.sh => flutter/build_android.sh | 0 build_ios.sh => flutter/build_ios.sh | 0 deploy.sh => flutter/deploy.sh | 0 {ios => flutter/ios}/.gitignore | 0 .../ios}/Flutter/AppFrameworkInfo.plist | 0 {ios => flutter/ios}/Flutter/Debug.xcconfig | 0 {ios => flutter/ios}/Flutter/Release.xcconfig | 0 {ios => flutter/ios}/Podfile | 0 {ios => flutter/ios}/Podfile.lock | 0 .../ios}/Runner.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 .../xcshareddata/xcschemes/Runner.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcshareddata/WorkspaceSettings.xcsettings | 0 {ios => flutter/ios}/Runner/AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Icon-App-1024x1024@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../LaunchImage.imageset/Contents.json | 0 .../LaunchImage.imageset/LaunchImage.png | Bin .../LaunchImage.imageset/LaunchImage@2x.png | Bin .../LaunchImage.imageset/LaunchImage@3x.png | Bin .../LaunchImage.imageset/README.md | 0 .../Runner/Base.lproj/LaunchScreen.storyboard | 0 .../ios}/Runner/Base.lproj/Main.storyboard | 0 .../ios}/Runner/GoogleService-Info.plist | 0 {ios => flutter/ios}/Runner/Info.plist | 0 .../ios}/Runner/Runner-Bridging-Header.h | 0 .../ios}/Runner/Runner.entitlements | 0 {ios => flutter/ios}/Runner/ffi.h | 0 ios_arm64.sh => flutter/ios_arm64.sh | 0 ios_x64.sh => flutter/ios_x64.sh | 0 {lib => flutter/lib}/common.dart | 0 {lib => flutter/lib}/main.dart | 0 {lib => flutter/lib}/models/chat_model.dart | 0 {lib => flutter/lib}/models/file_model.dart | 0 {lib => flutter/lib}/models/model.dart | 0 {lib => flutter/lib}/models/native_model.dart | 0 {lib => flutter/lib}/models/server_model.dart | 0 {lib => flutter/lib}/models/web_model.dart | 0 {lib => flutter/lib}/pages/chat_page.dart | 0 .../lib}/pages/connection_page.dart | 0 .../lib}/pages/file_manager_page.dart | 0 {lib => flutter/lib}/pages/home_page.dart | 0 {lib => flutter/lib}/pages/remote_page.dart | 0 {lib => flutter/lib}/pages/scan_page.dart | 0 {lib => flutter/lib}/pages/server_page.dart | 0 {lib => flutter/lib}/pages/settings_page.dart | 0 {lib => flutter/lib}/widgets/dialog.dart | 0 .../lib}/widgets/gesture_help.dart | 0 {lib => flutter/lib}/widgets/gestures.dart | 0 {lib => flutter/lib}/widgets/overlay.dart | 0 ndk_arm64.sh => flutter/ndk_arm64.sh | 0 ndk_x64.sh => flutter/ndk_x64.sh | 0 pubspec.lock => flutter/pubspec.lock | 0 pubspec.yaml => flutter/pubspec.yaml | 0 {test => flutter/test}/widget_test.dart | 0 .../web}/assets/favicon.71be6127.svg | 0 .../web}/assets/firebase-analytics.js | 0 {web => flutter/web}/assets/firebase-app.js | 0 .../web}/assets/index.06d14ce2.css | 0 {web => flutter/web}/assets/index.a0538fcc.js | 0 .../web}/assets/vendor.32e42528.js | 0 {web => flutter/web}/favicon.svg | 0 {web => flutter/web}/icons/Icon-192.png | Bin {web => flutter/web}/icons/Icon-512.png | Bin .../web}/icons/Icon-maskable-192.png | Bin .../web}/icons/Icon-maskable-512.png | Bin {web => flutter/web}/index.html | 0 {web => flutter/web}/js/.gitattributes | 0 {web => flutter/web}/js/.gitignore | 0 {web => flutter/web}/js/gen_js_from_hbb.py | 0 {web => flutter/web}/js/index.html | 0 {web => flutter/web}/js/package.json | 0 {web => flutter/web}/js/src/codec.js | 0 {web => flutter/web}/js/src/common.ts | 0 {web => flutter/web}/js/src/connection.ts | 0 {web => flutter/web}/js/src/globals.js | 0 {web => flutter/web}/js/src/main.ts | 0 {web => flutter/web}/js/src/style.css | 0 {web => flutter/web}/js/src/ui.js | 0 {web => flutter/web}/js/src/vite-env.d.ts | 0 {web => flutter/web}/js/src/websock.ts | 0 {web => flutter/web}/js/ts_proto.py | 0 {web => flutter/web}/js/tsconfig.json | 0 {web => flutter/web}/js/yarn.lock | 0 {web => flutter/web}/manifest.json | 0 {web => flutter/web}/yuv.js | 0 {web => flutter/web}/yuv.wasm | Bin 149 files changed, 357 deletions(-) delete mode 100644 android_doc.md rename .gitattributes => flutter/.gitattributes (100%) rename .gitignore => flutter/.gitignore (100%) rename .metadata => flutter/.metadata (100%) rename {android => flutter/android}/.gitignore (100%) rename {android => flutter/android}/app/build.gradle (100%) rename {android => flutter/android}/app/google-services.json (100%) rename {android => flutter/android}/app/src/debug/AndroidManifest.xml (100%) rename {android => flutter/android}/app/src/main/AndroidManifest.xml (100%) rename {android => flutter/android}/app/src/main/kotlin/com/carriez/flutter_hbb/BootReceiver.kt (100%) rename {android => flutter/android}/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt (100%) rename {android => flutter/android}/app/src/main/kotlin/com/carriez/flutter_hbb/MainActivity.kt (100%) rename {android => flutter/android}/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt (100%) rename {android => flutter/android}/app/src/main/kotlin/com/carriez/flutter_hbb/common.kt (100%) rename {android => flutter/android}/app/src/main/res/drawable-v21/launch_background.xml (100%) rename {android => flutter/android}/app/src/main/res/drawable/check_blue.xml (100%) rename {android => flutter/android}/app/src/main/res/drawable/close_red.xml (100%) rename {android => flutter/android}/app/src/main/res/drawable/launch_background.xml (100%) rename {android => flutter/android}/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {android => flutter/android}/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {android => flutter/android}/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {android => flutter/android}/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {android => flutter/android}/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {android => flutter/android}/app/src/main/res/values-night/styles.xml (100%) rename {android => flutter/android}/app/src/main/res/values/colors.xml (100%) rename {android => flutter/android}/app/src/main/res/values/strings.xml (100%) rename {android => flutter/android}/app/src/main/res/values/styles.xml (100%) rename {android => flutter/android}/app/src/main/res/xml/accessibility_service_config.xml (100%) rename {android => flutter/android}/app/src/profile/AndroidManifest.xml (100%) rename {android => flutter/android}/build.gradle (100%) rename {android => flutter/android}/flutter_hbb_android.iml (100%) rename {android => flutter/android}/gradle.properties (100%) rename {android => flutter/android}/gradle/wrapper/gradle-wrapper.properties (100%) rename {android => flutter/android}/key.jks (100%) rename {android => flutter/android}/settings.gradle (100%) rename {assets => flutter/assets}/android.png (100%) rename {assets => flutter/assets}/gestures.ttf (100%) rename {assets => flutter/assets}/insecure.png (100%) rename {assets => flutter/assets}/insecure_relay.png (100%) rename {assets => flutter/assets}/linux.png (100%) rename {assets => flutter/assets}/mac.png (100%) rename {assets => flutter/assets}/secure.png (100%) rename {assets => flutter/assets}/secure_relay.png (100%) rename {assets => flutter/assets}/win.png (100%) rename build_android.sh => flutter/build_android.sh (100%) rename build_ios.sh => flutter/build_ios.sh (100%) rename deploy.sh => flutter/deploy.sh (100%) rename {ios => flutter/ios}/.gitignore (100%) rename {ios => flutter/ios}/Flutter/AppFrameworkInfo.plist (100%) rename {ios => flutter/ios}/Flutter/Debug.xcconfig (100%) rename {ios => flutter/ios}/Flutter/Release.xcconfig (100%) rename {ios => flutter/ios}/Podfile (100%) rename {ios => flutter/ios}/Podfile.lock (100%) rename {ios => flutter/ios}/Runner.xcodeproj/project.pbxproj (100%) rename {ios => flutter/ios}/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {ios => flutter/ios}/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {ios => flutter/ios}/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {ios => flutter/ios}/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (100%) rename {ios => flutter/ios}/Runner.xcworkspace/contents.xcworkspacedata (100%) rename {ios => flutter/ios}/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {ios => flutter/ios}/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {ios => flutter/ios}/Runner/AppDelegate.swift (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (100%) rename {ios => flutter/ios}/Runner/Assets.xcassets/LaunchImage.imageset/README.md (100%) rename {ios => flutter/ios}/Runner/Base.lproj/LaunchScreen.storyboard (100%) rename {ios => flutter/ios}/Runner/Base.lproj/Main.storyboard (100%) rename {ios => flutter/ios}/Runner/GoogleService-Info.plist (100%) rename {ios => flutter/ios}/Runner/Info.plist (100%) rename {ios => flutter/ios}/Runner/Runner-Bridging-Header.h (100%) rename {ios => flutter/ios}/Runner/Runner.entitlements (100%) rename {ios => flutter/ios}/Runner/ffi.h (100%) rename ios_arm64.sh => flutter/ios_arm64.sh (100%) rename ios_x64.sh => flutter/ios_x64.sh (100%) rename {lib => flutter/lib}/common.dart (100%) rename {lib => flutter/lib}/main.dart (100%) rename {lib => flutter/lib}/models/chat_model.dart (100%) rename {lib => flutter/lib}/models/file_model.dart (100%) rename {lib => flutter/lib}/models/model.dart (100%) rename {lib => flutter/lib}/models/native_model.dart (100%) rename {lib => flutter/lib}/models/server_model.dart (100%) rename {lib => flutter/lib}/models/web_model.dart (100%) rename {lib => flutter/lib}/pages/chat_page.dart (100%) rename {lib => flutter/lib}/pages/connection_page.dart (100%) rename {lib => flutter/lib}/pages/file_manager_page.dart (100%) rename {lib => flutter/lib}/pages/home_page.dart (100%) rename {lib => flutter/lib}/pages/remote_page.dart (100%) rename {lib => flutter/lib}/pages/scan_page.dart (100%) rename {lib => flutter/lib}/pages/server_page.dart (100%) rename {lib => flutter/lib}/pages/settings_page.dart (100%) rename {lib => flutter/lib}/widgets/dialog.dart (100%) rename {lib => flutter/lib}/widgets/gesture_help.dart (100%) rename {lib => flutter/lib}/widgets/gestures.dart (100%) rename {lib => flutter/lib}/widgets/overlay.dart (100%) rename ndk_arm64.sh => flutter/ndk_arm64.sh (100%) rename ndk_x64.sh => flutter/ndk_x64.sh (100%) rename pubspec.lock => flutter/pubspec.lock (100%) rename pubspec.yaml => flutter/pubspec.yaml (100%) rename {test => flutter/test}/widget_test.dart (100%) rename {web => flutter/web}/assets/favicon.71be6127.svg (100%) rename {web => flutter/web}/assets/firebase-analytics.js (100%) rename {web => flutter/web}/assets/firebase-app.js (100%) rename {web => flutter/web}/assets/index.06d14ce2.css (100%) rename {web => flutter/web}/assets/index.a0538fcc.js (100%) rename {web => flutter/web}/assets/vendor.32e42528.js (100%) rename {web => flutter/web}/favicon.svg (100%) rename {web => flutter/web}/icons/Icon-192.png (100%) rename {web => flutter/web}/icons/Icon-512.png (100%) rename {web => flutter/web}/icons/Icon-maskable-192.png (100%) rename {web => flutter/web}/icons/Icon-maskable-512.png (100%) rename {web => flutter/web}/index.html (100%) rename {web => flutter/web}/js/.gitattributes (100%) rename {web => flutter/web}/js/.gitignore (100%) rename {web => flutter/web}/js/gen_js_from_hbb.py (100%) rename {web => flutter/web}/js/index.html (100%) rename {web => flutter/web}/js/package.json (100%) rename {web => flutter/web}/js/src/codec.js (100%) rename {web => flutter/web}/js/src/common.ts (100%) rename {web => flutter/web}/js/src/connection.ts (100%) rename {web => flutter/web}/js/src/globals.js (100%) rename {web => flutter/web}/js/src/main.ts (100%) rename {web => flutter/web}/js/src/style.css (100%) rename {web => flutter/web}/js/src/ui.js (100%) rename {web => flutter/web}/js/src/vite-env.d.ts (100%) rename {web => flutter/web}/js/src/websock.ts (100%) rename {web => flutter/web}/js/ts_proto.py (100%) rename {web => flutter/web}/js/tsconfig.json (100%) rename {web => flutter/web}/js/yarn.lock (100%) rename {web => flutter/web}/manifest.json (100%) rename {web => flutter/web}/yuv.js (100%) rename {web => flutter/web}/yuv.wasm (100%) diff --git a/android_doc.md b/android_doc.md deleted file mode 100644 index 674a85a71..000000000 --- a/android_doc.md +++ /dev/null @@ -1,357 +0,0 @@ -# RustDesk 安卓端被控文档记录 - -### 开发环境注意 - -- AS IDE Android 启动service时的闪退问题,开发安卓使用到service时,在Android IDE模式下用AS重新启动app前,如果已启动Service,需要确保已开启的app已经完全关闭,否则可能会出现下次启动service时闪退的怪问题。 -- 如果IDE时Flutter模式无此问题,flutter模式每次编译开启app的时间较长,推测flutter每次编译会重新安装一次apk包,而Android有热编译机制,启动Service时候,可能会带来闪退bug。 - -### 1.获取屏幕录像 - -##### 原理 流程 -MediaProjectionManager -> MediaProjection --> VirtualDisplay -> Surface <- MediaCodec/ImageReader - -- 获取mediaProjectionResultIntent - - **必须activity** - - activity获取mediaProjectionResultIntent - - 会提示用户 “获取屏幕录制权限” - -- 获取MediaProjection - - **必须service** - - 将mediaProjectionResultIntent 传递到后台服务 - - 通过后台服务获取MediaProjection - -- 创建Surface(理解为一个buf)和Surface消费者 - - MediaCodec(使用内置编码器)或者ImageReader(捕获原始数据)生成Surface传入VirtualDisplay的入参中 - - 设定编码等各类参数 - -- 获取VirtualDisplay(Surface 生产者) - - 前台服务 - - MediaProjection createVirtualDisplay方法创建VirtualDisplay - - 创建VirtualDisplay的入参之一是Surface - - 需要设定正确的VirtualDisplay尺寸 - -#####方案A 捕获原始数据传入rust进行编码 -- 构建ImageReader生成Surface -- **注意**:安卓捕获到的数据是RGBA格式,暂无BRGA的输出,在rust端需要调用libyuv中相应的rgbatoi420方法 -- 捕获到的数据存入一个bytearray,等待rust端调用获取 - -#####方案B 使用内置vp9编码器直接获取编码后的数据 传入rust进行编码 !暂不启用,等待完善! -- **自带的编码器无法直接控制流量,默认情况输出的帧率比较高,会造成网络堵塞延迟** -- 获取编码后的buf - - 通过MediaCodec回调获取到可用的数据 -- 通过jni传入Rust服务 - - 直接通过jni调用rust端的函数,将数据传递给video_service中 - -- 安卓VP9兼容性待测试 - - 目前测试2017年一台安卓7机器不支持vp9硬件加速 - - **安卓内置的编解码器并不一定是硬件解码** - -##### 权限注意 -``` - - - - -``` -- API大于O(26/Android8.0)时需要startForegroundService,且需要正确设置通知栏, - 新特性中使用ForegroundService不会被系统杀掉 - - -##### 资料 -- 关于 FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION 权限 - https://zhuanlan.zhihu.com/p/360356420 - -- 关于Notification 和 NotificationNotification - https://stackoverflow.com/questions/47531742/startforeground-fail-after-upgrade-to-android-8-1 - https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#NotificationCompat.Builder(android.content.Context) - -
- -### 2.获取控制 -暂时可行的方案是使用安卓无障碍服务 参考droidVNC项目, -**目前暂无可用连续输入的方案,暂时只能做到控制端鼠标滑动抬起鼠标后才能发送这组控制到安卓端** - -#### 无障碍服务获取权限 -- https://developer.android.com/guide/topics/ui/accessibility/service?hl=zh-cn#manifest -- 清单文件 - ``` - - - - - - - - ``` -- 创建一个单独的xml文件,用于无障碍服务配置 - ``` - // 首先清单文件中增加文件地址 - - ... - - - // 然后在此位置添加xml - // /res/xml/accessibility_service_config.xml - - ``` -- ~~连续手势 https://developer.android.com/guide/topics/ui/accessibility/service?hl=zh-cn#continued-gestures~~ - -#### knox.remotecontrol 三星手机 专用控制方式 - -https://docs.samsungknox.com/devref/knox-sdk/reference/com/samsung/android/knox/remotecontrol/package-summary.html - - -
- -### 3.获取音频输入 -https://developer.android.google.cn/guide/topics/media/playback-capture?hl=zh-cn - -**仅安卓10或更高可用** -目前谷歌只开放了Android10及以上系统同步音频内录功能 -10之前录音的时候会截取原本系统的音频输出 -即 开启内录时候无法在手机上正常使用耳机扬声器输出 -且普通应用的声音默认不会被捕获 - -**安卓10音频输入原理** -- 音频权限相当于是MediaProjection的附属产物 -- 只有在成功获取MediaProjection,开启了ForegroundService才能使用 -- 相比于AudioRecord普通用法使用,将setAudioSource改为setAudioPlaybackCaptureConfig,这里的AudioPlaybackCaptureConfiguration的构建需要使用到之前成功获取的MediaProjection -
-- **一些注意事项** - - 使用AudioFormat.ENCODING_PCM_FLOAT,数值范围[-1,1]的32位浮点数据,对应了rust端opus编码器的输入格式。 - - libopus库中使用的opus_encode_float,对于输入的音频数据长度有一定要求,安卓端输出的包过大需要分批发送 - - https://stackoverflow.com/questions/46786922/how-to-confirm-opus-encode-buffer-size - - https://docs.rs/audiopus_sys/0.2.2/audiopus_sys/fn.opus_encode_float.html - - > For example, at 48 kHz the permitted values are 120, 240, 480, 960, 1920, and 2880. - - 安卓11自带了opus输出,几年后或许可用 - - -
- -### Rust JVM 互相调用 - -rust端 引入 jni crate -https://docs.rs/jni/0.19.0/jni/index.html - -Kotlin端 -类中通过init{} 引入lib的调用 -```kotlin -class Main{ - init{ - System.loadLibrary("$libname") - } -} -``` - -Rust端 -使用jni规则进行函数命名 -```rust -pub unsafe extern "system" fn Java_com_carriez_flutter_1hbb_MainActivity_init( - env: JNIEnv, - class: JClass, - ctx:JObject, -){ - -} -``` -- 注意,原项目包名flutter_hbb 带有下划线,通过安卓的编译提示获得的命名方式为如上的`..._1hbb...`。 - -- 使用jni的时候,如果不捕捉错误会出现无输出崩溃的情况 -- 将安卓的对象实例(Context)在init的过程中传入rust端, -context通过env.new_global_ref()变成全局引用 -env.get_java_vm()获取到jvm - - 原理上 Rust端通过类找静态方法也可行,但在kotlin端测试失败,会遇到类名找不到,类静态方法找不到等问题,目前仅使用绑定具体context对象即可。 -- 将jvm和context 固定到全局变量中等待需要时候引用 -- 使用时,需要确保jvm与当前的线程绑定 -jvm.attach_current_thread_permanently() -- 然后通过jvm获得env -jvm.get_env() -- 通过env.call_method()方法传入context.as_obj()使用对象的方法 -- ByteArray(Kotlin) - - 会在JVM中编译成为java的byte[] - - rust端通过jbytearray接收,通过jni.rs的方法 -env.convert_byte_array()即可转化为Vec数组 - -- FloatArray(Kotlin) - - JAVA中的float[] - - jni.rs中使用get_float_array_region方法写入到新buf中 - -- ByteBuffer(Kotlin/Java) - - -- 关于 sig 一些用例 https://imzy.vip/posts/55704/ - - (I)V : input:Int,output:Void - - (I)Ljava/nio/ByteBuffer : input:Int,output:ByteBuffer. convert method:env.get_direct_buffer_address() - - ()[B : input:void,output:byte[](java) == ByteArray(kotlin) == jbytearray(jni env 中有对应解析方法到Vec\) - - call java的方法时,使用JValue枚举定义java变量 - - -
- -### UI交互相关 -收到无密码登录请求时,1.通知flutterUI页面问询用户2.通知栏通知用户 -- 否 - - 返回给rust端否 java端不做处理 -- 是 - - 返回给rust端是 java端开始采集音视频 - -收到有密码登录请求,rust端可以自动判断 -- 否 - - rust端自动处理返回密码错误 -- 是 - - 通知java端 java端开始采集 同时在通知推送栏中推送消息 - -#### 服务开启与关闭 -1.start listen -安卓端用户手动开始服务监听 开启service -获取视频权限 成功后 通知flutter将图标状态转为已开启 开启rust端的start_all() -然后就可以被其他人请求连接 - -2.login request -验证成功的请求, -安卓端开启视频 音频 输入的采集 -通知rust端logon response - -3.client close -rust端会自动结束 -rust端发送结束指令给安卓端 -安卓端停止各项采集 但服务依然开启 - -4.server close -4-1 -close conn -用户点击断开连接 -安卓端停止各项采集 -发送close指令给rust让rust关闭这个conn - -4-1 -close totally -如果当前有连接则问是否断开 -是则先执行一遍4-1 -然后关闭整个service - - -服务端主动关闭服务 -Config::set_option("stop_service","Y") -服务端再次启动服务 -Config::set_option("stop_service","") - - -### 关于安卓的service和进程 -实际测试 安卓7和安卓11表现不同 同一个apk下若有多个activity或service -安卓7 关闭activity后所有的服务都会强制关闭 可能是部分安卓厂商ROM手机特有 - -安卓8.1 和7类似 且安卓8.1和7录屏权限比较宽松 只需要获取一次 不需要每次播放都要获取录屏权限 - -*安卓7/8.1关闭activity 后就关闭service 可能是部分安卓厂商ROM手机特有 - -理论上 非bind启动的service可以脱离activity运行 就像三星安卓11上测试的情况 - -安卓11 关闭activity后service可以单独运行 可能由于前台应用可以持续维持 - 再次进入程序新的activity会共用之前在内存中的so程序 - -安卓Service运行在主线程!才能实现脱离activity独立运行 - ->只有在内存过低且必须回收系统资源以供拥有用户焦点的 Activity 使用时,Android 系统才会停止服务。如果将服务绑定到拥有用户焦点的 Activity,则它其不太可能会终止;如果将服务声明为在前台运行,则其几乎永远不会终止。如果服务已启动并长时间运行,则系统逐渐降低其在后台任务列表中的位置,而服务被终止的概率也会大幅提升—如果服务是启动服务,则您必须将其设计为能够妥善处理系统执行的重启。如果系统终止服务,则其会在资源可用时立即重启服务,但这还取决于您从 onStartCommand() 返回的值。 - ->如服务文档中所述,您可以创建同时具有已启动和已绑定两种状态的服务。换言之,您可以通过调用 startService() 来启动服务,让服务无限期运行,您也可以通过调用 bindService() 让客户端绑定到该服务。 -如果您确实允许服务同时具有已启动和已绑定状态,那么服务启动后,系统不会在所有客户端均与服务取消绑定后销毁服务,而必须由您通过调用 stopSelf() 或 stopService() 显式停止服务。 -尽管您通常应实现 onBind() 或 onStartCommand(),但有时也需要同时实现这两种方法。例如,音乐播放器可能认为,让其服务无限期运行并同时提供绑定很有用处。如此一来,Activity 便可启动服务来播放音乐,并且即使用户离开应用,音乐播放也不会停止。然后,当用户返回应用时,Activity 便能绑定到服务,重新获得播放控制权。 - -onRebind() - -[进程和应用生命周期](https://developer.android.com/guide/components/activities/process-lifecycle?hl=zh-cn) - -[进程和线程概览](https://developer.android.com/guide/components/processes-and-threads?hl=zh-cn) - -[绑定服务概览](https://developer.android.com/guide/components/bound-services?hl=zh-cn) - -Service持久化与绑定具体操作 [已测试安卓7.1以上系统特性相同] -1.前台服务 service中调用startForeground,启用持久化Service需要保证至少一次通过startForegroundService/startService 启动了Service且在Service中主动startForeground,可以通过intent传参指定一次init操作,在init的过程中startForeground,最关键的操作就是startForeground -即 通过startService 调用过的Service并且Service中调用过startForeground的Service就是持久化的前台服务,服务不会被系统kill -2.通过使用bindService将Activity与Service绑定 使用unbindService在onDestroy中解绑,如果不解绑会造成对Service的引用泄漏引发错误。可以在Activity中的onCreate中进行绑定,也可以根据需求按需手动进行绑定,bindService startService的先后顺序无所谓 -*只要注意至少一次对Service调用过startForegroundService/startService* - -关于startForegroundService -https://developer.android.com/about/versions/oreo/background?hl=zh-cn#services -尽量使用startForegroundService传递start命令 注意首次使用的时候需要在5秒内在服务中主动调用startService - -改成bindService逻辑 -直接在activity onCreate时候进行绑定 onDestroy时解绑(注意判空),绑定的时候进行一些判断。如果已存在服务会话则恢复之前的情况。如果不存在不服务会话则等待需要的时候再启动前台服务 - -
- -### 安卓通知 -- 注册前台服务startForegroundService 首次注册需要在5s内正确设置前台服务的通知栏显示内容。 -- MainService初始化时注册一个notificationManager,后续除了上条“前台服务依赖的通知内容”外的正常通知,都可以使用notificationManager来激活。 -- notificationManager.notify(id,notification) 用于普通的激活通知,注意 第一个id如果存在是更新之前的通知,更新通知不会有震动提示,如需新通知也发出震动提示用另一个id。 - -
- - -### 开机自启动 -利用接收RECEIVE_BOOT_COMPLETED的系统广播 -- 权限: - - 清单文件 - ```xml - - ... - - ... - - - - - - ... - ``` - - 创建一个class文件,类继承自BroadcastReceiver() - ```kotlin - class BootReceiver : BroadcastReceiver() { - override fun onReceive(context: Context?, intent: Intent?) { - if (intent != null) { - if ("android.intent.action.BOOT_COMPLETED" == intent.action){ - val it = Intent(context,MainService::class.java).apply { - addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - context?.startForegroundService(it) - }else{ - context?.startService(it) - } - Log.d(LOG_TAG,"onReceive done") - } - } - } - } - ``` - -
- - - -### 其他 -- Kotlin 与 compose 版本设置问题 - - https://stackoverflow.com/questions/67600344/jetpack-compose-on-kotlin-1-5-0 - - 在根目录的gradle中 设置两个正确对应版本 -- 如果开发环境中安装了超过一种NDK版本,则会需要在app的build.gradle中指定NDK版本 - ``` - // build.gradle in app - android { - ... - compileSdkVersion 30 - ndkVersion '22.1.7171670' - ... - ``` diff --git a/.gitattributes b/flutter/.gitattributes similarity index 100% rename from .gitattributes rename to flutter/.gitattributes diff --git a/.gitignore b/flutter/.gitignore similarity index 100% rename from .gitignore rename to flutter/.gitignore diff --git a/.metadata b/flutter/.metadata similarity index 100% rename from .metadata rename to flutter/.metadata diff --git a/android/.gitignore b/flutter/android/.gitignore similarity index 100% rename from android/.gitignore rename to flutter/android/.gitignore diff --git a/android/app/build.gradle b/flutter/android/app/build.gradle similarity index 100% rename from android/app/build.gradle rename to flutter/android/app/build.gradle diff --git a/android/app/google-services.json b/flutter/android/app/google-services.json similarity index 100% rename from android/app/google-services.json rename to flutter/android/app/google-services.json diff --git a/android/app/src/debug/AndroidManifest.xml b/flutter/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to flutter/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/flutter/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to flutter/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/com/carriez/flutter_hbb/BootReceiver.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/BootReceiver.kt similarity index 100% rename from android/app/src/main/kotlin/com/carriez/flutter_hbb/BootReceiver.kt rename to flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/BootReceiver.kt diff --git a/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt similarity index 100% rename from android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt rename to flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/InputService.kt diff --git a/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainActivity.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/carriez/flutter_hbb/MainActivity.kt rename to flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainActivity.kt diff --git a/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt similarity index 100% rename from android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt rename to flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/MainService.kt diff --git a/android/app/src/main/kotlin/com/carriez/flutter_hbb/common.kt b/flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/common.kt similarity index 100% rename from android/app/src/main/kotlin/com/carriez/flutter_hbb/common.kt rename to flutter/android/app/src/main/kotlin/com/carriez/flutter_hbb/common.kt diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/flutter/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable-v21/launch_background.xml rename to flutter/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/android/app/src/main/res/drawable/check_blue.xml b/flutter/android/app/src/main/res/drawable/check_blue.xml similarity index 100% rename from android/app/src/main/res/drawable/check_blue.xml rename to flutter/android/app/src/main/res/drawable/check_blue.xml diff --git a/android/app/src/main/res/drawable/close_red.xml b/flutter/android/app/src/main/res/drawable/close_red.xml similarity index 100% rename from android/app/src/main/res/drawable/close_red.xml rename to flutter/android/app/src/main/res/drawable/close_red.xml diff --git a/android/app/src/main/res/drawable/launch_background.xml b/flutter/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable/launch_background.xml rename to flutter/android/app/src/main/res/drawable/launch_background.xml diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values-night/styles.xml b/flutter/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from android/app/src/main/res/values-night/styles.xml rename to flutter/android/app/src/main/res/values-night/styles.xml diff --git a/android/app/src/main/res/values/colors.xml b/flutter/android/app/src/main/res/values/colors.xml similarity index 100% rename from android/app/src/main/res/values/colors.xml rename to flutter/android/app/src/main/res/values/colors.xml diff --git a/android/app/src/main/res/values/strings.xml b/flutter/android/app/src/main/res/values/strings.xml similarity index 100% rename from android/app/src/main/res/values/strings.xml rename to flutter/android/app/src/main/res/values/strings.xml diff --git a/android/app/src/main/res/values/styles.xml b/flutter/android/app/src/main/res/values/styles.xml similarity index 100% rename from android/app/src/main/res/values/styles.xml rename to flutter/android/app/src/main/res/values/styles.xml diff --git a/android/app/src/main/res/xml/accessibility_service_config.xml b/flutter/android/app/src/main/res/xml/accessibility_service_config.xml similarity index 100% rename from android/app/src/main/res/xml/accessibility_service_config.xml rename to flutter/android/app/src/main/res/xml/accessibility_service_config.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/flutter/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to flutter/android/app/src/profile/AndroidManifest.xml diff --git a/android/build.gradle b/flutter/android/build.gradle similarity index 100% rename from android/build.gradle rename to flutter/android/build.gradle diff --git a/android/flutter_hbb_android.iml b/flutter/android/flutter_hbb_android.iml similarity index 100% rename from android/flutter_hbb_android.iml rename to flutter/android/flutter_hbb_android.iml diff --git a/android/gradle.properties b/flutter/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to flutter/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/flutter/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to flutter/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/key.jks b/flutter/android/key.jks similarity index 100% rename from android/key.jks rename to flutter/android/key.jks diff --git a/android/settings.gradle b/flutter/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to flutter/android/settings.gradle diff --git a/assets/android.png b/flutter/assets/android.png similarity index 100% rename from assets/android.png rename to flutter/assets/android.png diff --git a/assets/gestures.ttf b/flutter/assets/gestures.ttf similarity index 100% rename from assets/gestures.ttf rename to flutter/assets/gestures.ttf diff --git a/assets/insecure.png b/flutter/assets/insecure.png similarity index 100% rename from assets/insecure.png rename to flutter/assets/insecure.png diff --git a/assets/insecure_relay.png b/flutter/assets/insecure_relay.png similarity index 100% rename from assets/insecure_relay.png rename to flutter/assets/insecure_relay.png diff --git a/assets/linux.png b/flutter/assets/linux.png similarity index 100% rename from assets/linux.png rename to flutter/assets/linux.png diff --git a/assets/mac.png b/flutter/assets/mac.png similarity index 100% rename from assets/mac.png rename to flutter/assets/mac.png diff --git a/assets/secure.png b/flutter/assets/secure.png similarity index 100% rename from assets/secure.png rename to flutter/assets/secure.png diff --git a/assets/secure_relay.png b/flutter/assets/secure_relay.png similarity index 100% rename from assets/secure_relay.png rename to flutter/assets/secure_relay.png diff --git a/assets/win.png b/flutter/assets/win.png similarity index 100% rename from assets/win.png rename to flutter/assets/win.png diff --git a/build_android.sh b/flutter/build_android.sh similarity index 100% rename from build_android.sh rename to flutter/build_android.sh diff --git a/build_ios.sh b/flutter/build_ios.sh similarity index 100% rename from build_ios.sh rename to flutter/build_ios.sh diff --git a/deploy.sh b/flutter/deploy.sh similarity index 100% rename from deploy.sh rename to flutter/deploy.sh diff --git a/ios/.gitignore b/flutter/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to flutter/ios/.gitignore diff --git a/ios/Flutter/AppFrameworkInfo.plist b/flutter/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from ios/Flutter/AppFrameworkInfo.plist rename to flutter/ios/Flutter/AppFrameworkInfo.plist diff --git a/ios/Flutter/Debug.xcconfig b/flutter/ios/Flutter/Debug.xcconfig similarity index 100% rename from ios/Flutter/Debug.xcconfig rename to flutter/ios/Flutter/Debug.xcconfig diff --git a/ios/Flutter/Release.xcconfig b/flutter/ios/Flutter/Release.xcconfig similarity index 100% rename from ios/Flutter/Release.xcconfig rename to flutter/ios/Flutter/Release.xcconfig diff --git a/ios/Podfile b/flutter/ios/Podfile similarity index 100% rename from ios/Podfile rename to flutter/ios/Podfile diff --git a/ios/Podfile.lock b/flutter/ios/Podfile.lock similarity index 100% rename from ios/Podfile.lock rename to flutter/ios/Podfile.lock diff --git a/ios/Runner.xcodeproj/project.pbxproj b/flutter/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from ios/Runner.xcodeproj/project.pbxproj rename to flutter/ios/Runner.xcodeproj/project.pbxproj diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to flutter/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from ios/Runner.xcworkspace/contents.xcworkspacedata rename to flutter/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to flutter/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to flutter/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/ios/Runner/AppDelegate.swift b/flutter/ios/Runner/AppDelegate.swift similarity index 100% rename from ios/Runner/AppDelegate.swift rename to flutter/ios/Runner/AppDelegate.swift diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ios/Runner/Base.lproj/LaunchScreen.storyboard rename to flutter/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/ios/Runner/Base.lproj/Main.storyboard b/flutter/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from ios/Runner/Base.lproj/Main.storyboard rename to flutter/ios/Runner/Base.lproj/Main.storyboard diff --git a/ios/Runner/GoogleService-Info.plist b/flutter/ios/Runner/GoogleService-Info.plist similarity index 100% rename from ios/Runner/GoogleService-Info.plist rename to flutter/ios/Runner/GoogleService-Info.plist diff --git a/ios/Runner/Info.plist b/flutter/ios/Runner/Info.plist similarity index 100% rename from ios/Runner/Info.plist rename to flutter/ios/Runner/Info.plist diff --git a/ios/Runner/Runner-Bridging-Header.h b/flutter/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from ios/Runner/Runner-Bridging-Header.h rename to flutter/ios/Runner/Runner-Bridging-Header.h diff --git a/ios/Runner/Runner.entitlements b/flutter/ios/Runner/Runner.entitlements similarity index 100% rename from ios/Runner/Runner.entitlements rename to flutter/ios/Runner/Runner.entitlements diff --git a/ios/Runner/ffi.h b/flutter/ios/Runner/ffi.h similarity index 100% rename from ios/Runner/ffi.h rename to flutter/ios/Runner/ffi.h diff --git a/ios_arm64.sh b/flutter/ios_arm64.sh similarity index 100% rename from ios_arm64.sh rename to flutter/ios_arm64.sh diff --git a/ios_x64.sh b/flutter/ios_x64.sh similarity index 100% rename from ios_x64.sh rename to flutter/ios_x64.sh diff --git a/lib/common.dart b/flutter/lib/common.dart similarity index 100% rename from lib/common.dart rename to flutter/lib/common.dart diff --git a/lib/main.dart b/flutter/lib/main.dart similarity index 100% rename from lib/main.dart rename to flutter/lib/main.dart diff --git a/lib/models/chat_model.dart b/flutter/lib/models/chat_model.dart similarity index 100% rename from lib/models/chat_model.dart rename to flutter/lib/models/chat_model.dart diff --git a/lib/models/file_model.dart b/flutter/lib/models/file_model.dart similarity index 100% rename from lib/models/file_model.dart rename to flutter/lib/models/file_model.dart diff --git a/lib/models/model.dart b/flutter/lib/models/model.dart similarity index 100% rename from lib/models/model.dart rename to flutter/lib/models/model.dart diff --git a/lib/models/native_model.dart b/flutter/lib/models/native_model.dart similarity index 100% rename from lib/models/native_model.dart rename to flutter/lib/models/native_model.dart diff --git a/lib/models/server_model.dart b/flutter/lib/models/server_model.dart similarity index 100% rename from lib/models/server_model.dart rename to flutter/lib/models/server_model.dart diff --git a/lib/models/web_model.dart b/flutter/lib/models/web_model.dart similarity index 100% rename from lib/models/web_model.dart rename to flutter/lib/models/web_model.dart diff --git a/lib/pages/chat_page.dart b/flutter/lib/pages/chat_page.dart similarity index 100% rename from lib/pages/chat_page.dart rename to flutter/lib/pages/chat_page.dart diff --git a/lib/pages/connection_page.dart b/flutter/lib/pages/connection_page.dart similarity index 100% rename from lib/pages/connection_page.dart rename to flutter/lib/pages/connection_page.dart diff --git a/lib/pages/file_manager_page.dart b/flutter/lib/pages/file_manager_page.dart similarity index 100% rename from lib/pages/file_manager_page.dart rename to flutter/lib/pages/file_manager_page.dart diff --git a/lib/pages/home_page.dart b/flutter/lib/pages/home_page.dart similarity index 100% rename from lib/pages/home_page.dart rename to flutter/lib/pages/home_page.dart diff --git a/lib/pages/remote_page.dart b/flutter/lib/pages/remote_page.dart similarity index 100% rename from lib/pages/remote_page.dart rename to flutter/lib/pages/remote_page.dart diff --git a/lib/pages/scan_page.dart b/flutter/lib/pages/scan_page.dart similarity index 100% rename from lib/pages/scan_page.dart rename to flutter/lib/pages/scan_page.dart diff --git a/lib/pages/server_page.dart b/flutter/lib/pages/server_page.dart similarity index 100% rename from lib/pages/server_page.dart rename to flutter/lib/pages/server_page.dart diff --git a/lib/pages/settings_page.dart b/flutter/lib/pages/settings_page.dart similarity index 100% rename from lib/pages/settings_page.dart rename to flutter/lib/pages/settings_page.dart diff --git a/lib/widgets/dialog.dart b/flutter/lib/widgets/dialog.dart similarity index 100% rename from lib/widgets/dialog.dart rename to flutter/lib/widgets/dialog.dart diff --git a/lib/widgets/gesture_help.dart b/flutter/lib/widgets/gesture_help.dart similarity index 100% rename from lib/widgets/gesture_help.dart rename to flutter/lib/widgets/gesture_help.dart diff --git a/lib/widgets/gestures.dart b/flutter/lib/widgets/gestures.dart similarity index 100% rename from lib/widgets/gestures.dart rename to flutter/lib/widgets/gestures.dart diff --git a/lib/widgets/overlay.dart b/flutter/lib/widgets/overlay.dart similarity index 100% rename from lib/widgets/overlay.dart rename to flutter/lib/widgets/overlay.dart diff --git a/ndk_arm64.sh b/flutter/ndk_arm64.sh similarity index 100% rename from ndk_arm64.sh rename to flutter/ndk_arm64.sh diff --git a/ndk_x64.sh b/flutter/ndk_x64.sh similarity index 100% rename from ndk_x64.sh rename to flutter/ndk_x64.sh diff --git a/pubspec.lock b/flutter/pubspec.lock similarity index 100% rename from pubspec.lock rename to flutter/pubspec.lock diff --git a/pubspec.yaml b/flutter/pubspec.yaml similarity index 100% rename from pubspec.yaml rename to flutter/pubspec.yaml diff --git a/test/widget_test.dart b/flutter/test/widget_test.dart similarity index 100% rename from test/widget_test.dart rename to flutter/test/widget_test.dart diff --git a/web/assets/favicon.71be6127.svg b/flutter/web/assets/favicon.71be6127.svg similarity index 100% rename from web/assets/favicon.71be6127.svg rename to flutter/web/assets/favicon.71be6127.svg diff --git a/web/assets/firebase-analytics.js b/flutter/web/assets/firebase-analytics.js similarity index 100% rename from web/assets/firebase-analytics.js rename to flutter/web/assets/firebase-analytics.js diff --git a/web/assets/firebase-app.js b/flutter/web/assets/firebase-app.js similarity index 100% rename from web/assets/firebase-app.js rename to flutter/web/assets/firebase-app.js diff --git a/web/assets/index.06d14ce2.css b/flutter/web/assets/index.06d14ce2.css similarity index 100% rename from web/assets/index.06d14ce2.css rename to flutter/web/assets/index.06d14ce2.css diff --git a/web/assets/index.a0538fcc.js b/flutter/web/assets/index.a0538fcc.js similarity index 100% rename from web/assets/index.a0538fcc.js rename to flutter/web/assets/index.a0538fcc.js diff --git a/web/assets/vendor.32e42528.js b/flutter/web/assets/vendor.32e42528.js similarity index 100% rename from web/assets/vendor.32e42528.js rename to flutter/web/assets/vendor.32e42528.js diff --git a/web/favicon.svg b/flutter/web/favicon.svg similarity index 100% rename from web/favicon.svg rename to flutter/web/favicon.svg diff --git a/web/icons/Icon-192.png b/flutter/web/icons/Icon-192.png similarity index 100% rename from web/icons/Icon-192.png rename to flutter/web/icons/Icon-192.png diff --git a/web/icons/Icon-512.png b/flutter/web/icons/Icon-512.png similarity index 100% rename from web/icons/Icon-512.png rename to flutter/web/icons/Icon-512.png diff --git a/web/icons/Icon-maskable-192.png b/flutter/web/icons/Icon-maskable-192.png similarity index 100% rename from web/icons/Icon-maskable-192.png rename to flutter/web/icons/Icon-maskable-192.png diff --git a/web/icons/Icon-maskable-512.png b/flutter/web/icons/Icon-maskable-512.png similarity index 100% rename from web/icons/Icon-maskable-512.png rename to flutter/web/icons/Icon-maskable-512.png diff --git a/web/index.html b/flutter/web/index.html similarity index 100% rename from web/index.html rename to flutter/web/index.html diff --git a/web/js/.gitattributes b/flutter/web/js/.gitattributes similarity index 100% rename from web/js/.gitattributes rename to flutter/web/js/.gitattributes diff --git a/web/js/.gitignore b/flutter/web/js/.gitignore similarity index 100% rename from web/js/.gitignore rename to flutter/web/js/.gitignore diff --git a/web/js/gen_js_from_hbb.py b/flutter/web/js/gen_js_from_hbb.py similarity index 100% rename from web/js/gen_js_from_hbb.py rename to flutter/web/js/gen_js_from_hbb.py diff --git a/web/js/index.html b/flutter/web/js/index.html similarity index 100% rename from web/js/index.html rename to flutter/web/js/index.html diff --git a/web/js/package.json b/flutter/web/js/package.json similarity index 100% rename from web/js/package.json rename to flutter/web/js/package.json diff --git a/web/js/src/codec.js b/flutter/web/js/src/codec.js similarity index 100% rename from web/js/src/codec.js rename to flutter/web/js/src/codec.js diff --git a/web/js/src/common.ts b/flutter/web/js/src/common.ts similarity index 100% rename from web/js/src/common.ts rename to flutter/web/js/src/common.ts diff --git a/web/js/src/connection.ts b/flutter/web/js/src/connection.ts similarity index 100% rename from web/js/src/connection.ts rename to flutter/web/js/src/connection.ts diff --git a/web/js/src/globals.js b/flutter/web/js/src/globals.js similarity index 100% rename from web/js/src/globals.js rename to flutter/web/js/src/globals.js diff --git a/web/js/src/main.ts b/flutter/web/js/src/main.ts similarity index 100% rename from web/js/src/main.ts rename to flutter/web/js/src/main.ts diff --git a/web/js/src/style.css b/flutter/web/js/src/style.css similarity index 100% rename from web/js/src/style.css rename to flutter/web/js/src/style.css diff --git a/web/js/src/ui.js b/flutter/web/js/src/ui.js similarity index 100% rename from web/js/src/ui.js rename to flutter/web/js/src/ui.js diff --git a/web/js/src/vite-env.d.ts b/flutter/web/js/src/vite-env.d.ts similarity index 100% rename from web/js/src/vite-env.d.ts rename to flutter/web/js/src/vite-env.d.ts diff --git a/web/js/src/websock.ts b/flutter/web/js/src/websock.ts similarity index 100% rename from web/js/src/websock.ts rename to flutter/web/js/src/websock.ts diff --git a/web/js/ts_proto.py b/flutter/web/js/ts_proto.py similarity index 100% rename from web/js/ts_proto.py rename to flutter/web/js/ts_proto.py diff --git a/web/js/tsconfig.json b/flutter/web/js/tsconfig.json similarity index 100% rename from web/js/tsconfig.json rename to flutter/web/js/tsconfig.json diff --git a/web/js/yarn.lock b/flutter/web/js/yarn.lock similarity index 100% rename from web/js/yarn.lock rename to flutter/web/js/yarn.lock diff --git a/web/manifest.json b/flutter/web/manifest.json similarity index 100% rename from web/manifest.json rename to flutter/web/manifest.json diff --git a/web/yuv.js b/flutter/web/yuv.js similarity index 100% rename from web/yuv.js rename to flutter/web/yuv.js diff --git a/web/yuv.wasm b/flutter/web/yuv.wasm similarity index 100% rename from web/yuv.wasm rename to flutter/web/yuv.wasm