安卓权限添加

This commit is contained in:
2026-10-20 16:45:51 +08:00
parent 68984aa7d2
commit 178cd2533c
9 changed files with 340 additions and 54 deletions

View File

@@ -0,0 +1,18 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.maibu.usb_camera_android">
<application>
<!--
USB 权限结果广播接收器(静态注册)。
Android 14+ 要求 FLAG_MUTABLE 的 PendingIntent 必须搭配显式 Intent
(指定目标 class),因此必须在 manifest 里声明 Receiver。
exported=false:只响应本 App 显式广播,禁止其他 App 触发。
-->
<receiver
android:name="com.maibu.usb_camera_android.UsbPermissionReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.maibu.usb_camera_android.USB_PERMISSION" />
</intent-filter>
</receiver>
</application>
</manifest>