Files
bzForGk2/app/src/main/AndroidManifest.xml
T
hughhuangandClaude Sonnet 4.5 a5968393b3 feat: add manifest with permissions and components
创建 AndroidManifest.xml 文件,配置应用权限和组件:
- 声明所需权限(存储访问、设置壁纸、定时任务等)
- 注册主 Activity 和设置 Activity
- 配置自动壁纸服务
- 添加壁纸变更广播接收器

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 23:45:47 +08:00

72 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 权限声明 -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BzForGk2">
<!-- Main Activity -->
<activity
android:name=".ui.MainActivity"
android:exported="true"
android:theme="@style/Theme.BzForGk2">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Settings Activity -->
<activity
android:name=".ui.SettingsActivity"
android:exported="false"
android:label="@string/settings"
android:parentActivityName=".ui.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.MainActivity" />
</activity>
<!-- Wallpaper Service -->
<service
android:name=".wallpaper.AutoWallpaperService"
android:description="@string/wallpaper_description"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:permission="android.permission.BIND_WALLPAPER"
android:exported="true">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/wallpaper_info" />
</service>
<!-- Broadcast Receiver for wallpaper changes -->
<receiver
android:name=".receiver.WallpaperChangeReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.hugh.bz.gk2.ACTION_CHANGE_WALLPAPER" />
</intent-filter>
</receiver>
</application>
</manifest>