168 lines
7.1 KiB
XML
168 lines
7.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
~ Copyright (c) 2022 New Vector Ltd
|
|
~
|
|
~ 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"
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
<!-- To be able to install APK from the application -->
|
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
|
|
<!-- Do not enable enableOnBackInvokedCallback until https://issuetracker.google.com/issues/271303558 is fixed -->
|
|
<application
|
|
android:name=".ElementXApplication"
|
|
android:allowBackup="false"
|
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
|
android:enableOnBackInvokedCallback="false"
|
|
android:fullBackupContent="@xml/backup_rules"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:localeConfig="@xml/locales_config"
|
|
android:networkSecurityConfig="@xml/network_security_config"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/Theme.ElementX"
|
|
tools:targetApi="33">
|
|
|
|
<provider
|
|
android:name="androidx.startup.InitializationProvider"
|
|
android:authorities="${applicationId}.androidx-startup"
|
|
android:exported="false">
|
|
|
|
<meta-data
|
|
android:name='androidx.lifecycle.ProcessLifecycleInitializer'
|
|
android:value='androidx.startup' />
|
|
|
|
</provider>
|
|
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|uiMode"
|
|
android:exported="true"
|
|
android:launchMode="singleTop"
|
|
android:theme="@style/Theme.ElementX.Splash"
|
|
android:windowSoftInputMode="adjustResize">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
<!-- Handle deep-link for notification ./tools/adb/deeplink.sh -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<data
|
|
android:host="open"
|
|
android:scheme="elementx" />
|
|
</intent-filter>
|
|
<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="io.element" />
|
|
</intent-filter>
|
|
<!--
|
|
Element web links
|
|
-->
|
|
<intent-filter android:autoVerify="true">
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="https" />
|
|
<!-- Note: we can't use "*.element.io" here because it'll intercept the "mas.element.io" domain too. -->
|
|
<!-- Matching asset file: https://app.element.io/.well-known/assetlinks.json -->
|
|
<data android:host="app.element.io" />
|
|
<!-- Matching asset file: https://develop.element.io/.well-known/assetlinks.json -->
|
|
<data android:host="develop.element.io" />
|
|
<!-- Matching asset file: https://staging.element.io/.well-known/assetlinks.json -->
|
|
<data android:host="staging.element.io" />
|
|
</intent-filter>
|
|
<!--
|
|
matrix.to links
|
|
Note: On Android 12 and higher clicking a web link (that is not an Android App Link) always shows content in a web browser
|
|
https://developer.android.com/training/app-links#web-links
|
|
-->
|
|
<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="https" />
|
|
<data android:host="matrix.to" />
|
|
</intent-filter>
|
|
<!--
|
|
links from matrix.to website
|
|
-->
|
|
<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="element" />
|
|
<data android:host="user" />
|
|
<data android:host="room" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<!-- Using an activity-alias for incoming share intent, in order
|
|
to be able to disable the feature programmatically -->
|
|
<activity-alias
|
|
android:name=".ShareActivity"
|
|
android:exported="true"
|
|
android:targetActivity=".MainActivity">
|
|
<!-- Incoming share simple -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.SEND" />
|
|
<data android:mimeType="*/*" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.OPENABLE" />
|
|
</intent-filter>
|
|
<!-- Incoming share multiple -->
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
|
<data android:mimeType="*/*" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.OPENABLE" />
|
|
</intent-filter>
|
|
</activity-alias>
|
|
|
|
<provider
|
|
android:name="androidx.startup.InitializationProvider"
|
|
android:authorities="${applicationId}.androidx-startup"
|
|
android:exported="false"
|
|
tools:node="remove" />
|
|
|
|
<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_providers" />
|
|
</provider>
|
|
|
|
</application>
|
|
|
|
</manifest>
|