ADD file via upload

main
pms5ftuno 8 months ago
parent df46f8b252
commit bf5ca2c420

@ -0,0 +1,227 @@
<!-- Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.micode.notes"
android:versionCode="1"
android:versionName="0.1">
<!-- 指定应用兼容的SDK版本范围 -->
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="33" /> <!-- 更新为最新API级别 -->
<!-- 运行时权限:需要在代码中动态请求 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" /> <!-- 限制仅在Android 9及以下需要 -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- 安装快捷方式权限 -->
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<!-- 网络相关权限 -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- 账户同步相关权限 -->
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<!-- 系统相关权限 -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<!-- 应用组件定义 -->
<application
android:icon="@drawable/icon_app"
android:label="@string/app_name"
android:allowBackup="true" <!-- 启用备份功能 -->
android:fullBackupContent="true" <!-- 启用完整备份 -->
android:usesCleartextTraffic="false" <!-- 默认禁止明文流量 -->
android:requestLegacyExternalStorage="true"> <!-- 适配Android 10存储变更 -->
<!-- 主活动:笔记列表界面 -->
<activity
android:name=".ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize|layoutDirection|uiMode" <!-- 增加更多配置变化 -->
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
android:exported="true" <!-- 明确设置为可导出 -->
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- 添加支持从浏览器等应用分享文本到笔记 -->
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>
</activity>
<!-- 笔记编辑活动 -->
<activity
android:name=".ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
android:exported="false"> <!-- 不导出给其他应用 -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="vnd.android.cursor.item/text_note"/>
<data android:mimeType="vnd.android.cursor.item/call_note"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.INSERT_OR_EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="vnd.android.cursor.item/text_note"/>
<data android:mimeType="vnd.android.cursor.item/call_note"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable"/>
</activity>
<!-- 内容提供者 -->
<provider
android:name="net.micode.notes.data.NotesProvider"
android:authorities="micode_notes"
android:multiprocess="true"
android:exported="false" <!-- 不导出给其他应用 -->
android:grantUriPermissions="true"> <!-- 允许URI权限控制 -->
<!-- 为不同API级别提供路径权限 -->
<grant-uri-permission android:path="/notes" />
<grant-uri-permission android:pathPrefix="/notes" />
</provider>
<!-- 2x2尺寸的桌面小部件 -->
<receiver
android:name=".widget.NoteWidgetProvider_2x"
android:label="@string/app_widget2x2"
android:exported="true"> <!-- 允许系统访问 -->
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
<action android:name="android.appwidget.action.APPWIDGET_DELETED"/>
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_2x_info"/>
</receiver>
<!-- 4x4尺寸的桌面小部件 -->
<receiver
android:name=".widget.NoteWidgetProvider_4x"
android:label="@string/app_widget4x4"
android:exported="true"> <!-- 允许系统访问 -->
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
<action android:name="android.appwidget.action.APPWIDGET_DELETED"/>
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_4x_info"/>
</receiver>
<!-- 开机启动接收器 -->
<receiver
android:name=".ui.AlarmInitReceiver"
android:exported="false"> <!-- 不导出给其他应用 -->
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<!-- 添加更多启动事件 -->
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>
<!-- 闹钟提醒接收器 -->
<receiver
android:name="net.micode.notes.ui.AlarmReceiver"
android:process=":remote"
android:exported="false"> <!-- 不导出给其他应用 -->
<intent-filter>
<action android:name="net.micode.notes.ALARM_TRIGGERED"/>
</intent-filter>
</receiver>
<!-- 闹钟提醒活动 -->
<activity
android:name=".ui.AlarmAlertActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"
android:exported="false"> <!-- 不导出给其他应用 -->
<intent-filter>
<action android:name="net.micode.notes.SHOW_ALARM"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!-- 设置活动 -->
<activity
android:name="net.micode.notes.ui.NotesPreferenceActivity"
android:label="@string/preferences_title"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Holo.Light"
android:exported="false"> <!-- 不导出给其他应用 -->
<intent-filter>
<action android:name="android.intent.action.SETTINGS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!-- Google任务同步服务 -->
<service
android:name="net.micode.notes.gtask.remote.GTaskSyncService"
android:exported="false" <!-- 不导出给其他应用 -->
android:enabled="true"
android:permission="android.permission.BIND_SYNC_ADAPTER">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter" />
<meta-data
android:name="android.provider.CONTACTS_STRUCTURE"
android:resource="@xml/contacts" />
</service>
<!-- 设置默认搜索活动 -->
<meta-data android:name="android.app.default_searchable" android:value=".ui.NoteEditActivity"/>
<!-- 添加应用图标元数据 -->
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</application>
</manifest>
Loading…
Cancel
Save