- 添加READ_MEDIA_IMAGES和READ_EXTERNAL_STORAGE权限 - 实现权限请求逻辑,用户首次点击时请求权限 - 权限授予后自动导入最后N张照片
116 lines
4.5 KiB
XML
116 lines
4.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="com.inspection.camera"
|
|
android:versionCode="1"
|
|
android:versionName="1.0" >
|
|
|
|
<uses-sdk
|
|
android:minSdkVersion="26"
|
|
android:targetSdkVersion="34" />
|
|
|
|
<!-- 相机权限 -->
|
|
<uses-feature
|
|
android:name="android.hardware.camera"
|
|
android:required="true" />
|
|
|
|
<uses-permission android:name="android.permission.CAMERA" />
|
|
|
|
<!-- 定位权限 -->
|
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
|
|
<!-- 相册读取权限 -->
|
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
|
<uses-permission
|
|
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
|
android:maxSdkVersion="32" />
|
|
|
|
<permission
|
|
android:name="com.inspection.camera.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
|
|
android:protectionLevel="signature" />
|
|
|
|
<uses-permission android:name="com.inspection.camera.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" />
|
|
|
|
<application
|
|
android:name="com.inspection.camera.InspectionCameraApp"
|
|
android:allowBackup="true"
|
|
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
|
|
android:debuggable="true"
|
|
android:extractNativeLibs="false"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/Theme.InspectionCamera" >
|
|
<activity
|
|
android:name="com.inspection.camera.ui.MainActivity"
|
|
android:exported="true"
|
|
android:theme="@style/Theme.InspectionCamera" >
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<service
|
|
android:name="androidx.camera.core.impl.MetadataHolderService"
|
|
android:enabled="false"
|
|
android:exported="false" >
|
|
<meta-data
|
|
android:name="androidx.camera.core.impl.MetadataHolderService.DEFAULT_CONFIG_PROVIDER"
|
|
android:value="androidx.camera.camera2.Camera2Config$DefaultProvider" />
|
|
</service>
|
|
|
|
<activity
|
|
android:name="com.google.android.gms.common.api.GoogleApiActivity"
|
|
android:exported="false"
|
|
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
|
<activity
|
|
android:name="androidx.compose.ui.tooling.PreviewActivity"
|
|
android:exported="true" />
|
|
<activity
|
|
android:name="androidx.activity.ComponentActivity"
|
|
android:exported="true" />
|
|
|
|
<provider
|
|
android:name="androidx.startup.InitializationProvider"
|
|
android:authorities="com.inspection.camera.androidx-startup"
|
|
android:exported="false" >
|
|
<meta-data
|
|
android:name="androidx.emoji2.text.EmojiCompatInitializer"
|
|
android:value="androidx.startup" />
|
|
<meta-data
|
|
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
|
|
android:value="androidx.startup" />
|
|
<meta-data
|
|
android:name="androidx.profileinstaller.ProfileInstallerInitializer"
|
|
android:value="androidx.startup" />
|
|
</provider>
|
|
|
|
<meta-data
|
|
android:name="com.google.android.gms.version"
|
|
android:value="@integer/google_play_services_version" />
|
|
|
|
<receiver
|
|
android:name="androidx.profileinstaller.ProfileInstallReceiver"
|
|
android:directBootAware="false"
|
|
android:enabled="true"
|
|
android:exported="true"
|
|
android:permission="android.permission.DUMP" >
|
|
<intent-filter>
|
|
<action android:name="androidx.profileinstaller.action.INSTALL_PROFILE" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="androidx.profileinstaller.action.SKIP_FILE" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="androidx.profileinstaller.action.SAVE_PROFILE" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="androidx.profileinstaller.action.BENCHMARK_OPERATION" />
|
|
</intent-filter>
|
|
</receiver>
|
|
</application>
|
|
|
|
</manifest> |