| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools">
- <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/AppTheme">
- <activity
- android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
- android:name=".MainActivity"
- android:label="@string/title_activity_main"
- android:theme="@style/AppTheme.NoActionBarLaunch"
- android:launchMode="singleTask"
- android:exported="true">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- <!--
- 自定义 scheme 深链(2026-11-15)
- fmode://chat/<agentId>/<sessionId>
- fmode://messages / contacts / workbench / mine
- 用途:系统通知点击、微信/企微内点链接、其他 App 跳转,
- 都能把用户直接带到对应会话。解析逻辑见 `core/deep-link.service.ts`。
- 🔴 上面的 `launchMode="singleTask"` 是这套方案能工作的前提:
- 已在运行时,新链接会通过 `onNewIntent` 交给同一个实例(`appUrlOpen` 事件),
- 而不是再起一个 App 实例。验证时不要顺手把它改掉。
- 🔴 `android:autoVerify` **不加**:那是给 https 的 App Links 用的,
- 自定义 scheme 没有域名归属校验,加了反而会产生误导。
- -->
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:scheme="fmode" />
- </intent-filter>
- </activity>
- <provider
- android:name="androidx.core.content.FileProvider"
- android:authorities="${applicationId}.fileprovider"
- android:exported="false"
- android:grantUriPermissions="true">
- <meta-data
- android:name="android.support.FILE_PROVIDER_PATHS"
- android:resource="@xml/file_paths"></meta-data>
- </provider>
- </application>
- <!--
- 🔴 移除 @capacitor/local-notifications 自带的精确闹钟权限(2026-11-15 真机实测)
- 该插件在自身 manifest 里声明了 SCHEDULE_EXACT_ALARM。保留的后果:
- 用户首次授权通知后,小米系统会**顺带跳转到「闹钟和提醒」设置页**,
- 用户会莫名其妙 —— 这是一个即时消息 App,凭什么要闹钟权限?
- 我们只用 `schedule()` 发**立即**通知,不需要毫秒级定时,故显式移除。
- 将来若真要做定时提醒,再把它加回来并给出用途说明。
- -->
- <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" tools:node="remove" />
- <!-- Permissions -->
- <uses-permission android:name="android.permission.INTERNET" />
- </manifest>
|