e-ntfy-android/app/src/main/AndroidManifest.xml

164 lines
7.5 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2021-10-31 20:19:25 +01:00
package="io.heckel.ntfy">
2022-02-02 18:11:04 +01:00
<!-- Permissions -->
2021-11-21 20:54:13 +01:00
<uses-permission android:name="android.permission.INTERNET"/>
2022-02-02 18:11:04 +01:00
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <!-- For instant delivery foregrounds service -->
<uses-permission android:name="android.permission.WAKE_LOCK"/> <!-- To keep foreground service awake; soon not needed anymore -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <!-- To restart service on reboot -->
<uses-permission android:name="android.permission.VIBRATE"/> <!-- Incoming notifications should be able to vibrate the phone -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/> <!-- Only required on SDK <= 28 -->
2022-02-02 18:11:04 +01:00
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> <!-- To install packages downloaded through ntfy; craazyy! -->
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/> <!-- To reschedule the websocket retry -->
2021-10-25 21:39:52 +02:00
<application
2021-10-31 20:19:25 +01:00
android:name=".app.Application"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
2021-11-14 01:26:37 +01:00
android:theme="@style/AppTheme"
2022-01-06 11:29:41 +01:00
android:networkSecurityConfig="@xml/network_security_config"
2021-11-14 01:26:37 +01:00
android:usesCleartextTraffic="true">
2021-12-31 01:34:25 +01:00
2021-10-30 03:13:58 +02:00
<!-- Main activity -->
2021-10-31 20:19:25 +01:00
<activity
android:name=".ui.MainActivity"
2022-01-28 17:03:09 +01:00
android:label="@string/app_name"
android:exported="true">
<intent-filter>
2021-10-31 20:19:25 +01:00
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
2021-11-22 21:45:43 +01:00
</activity>
<!-- Detail activity -->
<activity
android:name=".ui.DetailActivity"
2022-04-12 04:13:03 +02:00
android:parentActivityName=".ui.MainActivity"
android:exported="true">
2021-10-31 20:19:25 +01:00
<meta-data
android:name="android.support.PARENT_ACTIVITY"
2021-11-21 20:54:13 +01:00
android:value=".ui.MainActivity"/>
2022-04-12 04:13:03 +02:00
<!-- Open ntfy:// links with the app -->
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="ntfy" />
</intent-filter>
2021-11-22 21:45:43 +01:00
</activity>
2021-12-31 01:34:25 +01:00
<!-- Settings activity -->
<activity
android:name=".ui.SettingsActivity"
android:parentActivityName=".ui.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.MainActivity"/>
</activity>
2022-01-30 20:05:36 +01:00
<!-- Detail settings activity -->
<activity
android:name=".ui.DetailSettingsActivity"
android:parentActivityName=".ui.DetailActivity">
</activity>
2022-02-11 16:46:55 +01:00
<!-- Share file activity, incoming files/shares -->
<activity android:name=".ui.ShareActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
2022-02-11 21:55:08 +01:00
<data android:mimeType="text/*" />
<data android:mimeType="audio/*" />
<data android:mimeType="video/*" />
<data android:mimeType="application/*" />
2022-02-11 16:46:55 +01:00
</intent-filter>
</activity>
<!-- Hack: Activity used for "view" action button with "clear=true" (to be able to cancel notifications and show a URL) -->
<activity
android:name=".msg.NotificationService$ViewActionWithClearActivity"
android:exported="false">
</activity>
2021-11-22 21:45:43 +01:00
<!-- Subscriber foreground service for hosts other than ntfy.sh -->
<service android:name=".service.SubscriberService"/>
2021-11-22 21:45:43 +01:00
<!-- Subscriber service restart on reboot -->
2021-12-31 01:34:25 +01:00
<receiver
android:name=".service.SubscriberService$BootStartReceiver"
2022-01-28 17:03:09 +01:00
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
2021-11-22 21:45:43 +01:00
</receiver>
2021-12-14 02:54:36 +01:00
<!-- Subscriber service restart on destruction -->
2021-12-31 01:34:25 +01:00
<receiver
android:name=".service.SubscriberService$AutoRestartReceiver"
android:enabled="true"
android:exported="false"/>
2021-12-14 02:54:36 +01:00
<!-- Broadcast receiver to send messages via intents -->
2021-12-31 01:34:25 +01:00
<receiver
android:name=".msg.BroadcastService$BroadcastReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="io.heckel.ntfy.SEND_MESSAGE"/>
</intent-filter>
</receiver>
2021-12-31 01:34:25 +01:00
<!-- Broadcast receiver for UnifiedPush; must match https://github.com/UnifiedPush/UP-spec/blob/main/specifications.md -->
<receiver
android:name=".up.BroadcastReceiver"
android:enabled="true"
android:exported="true">
2021-12-29 20:33:17 +01:00
<intent-filter>
2021-12-31 01:34:25 +01:00
<action android:name="org.unifiedpush.android.distributor.REGISTER"/>
<action android:name="org.unifiedpush.android.distributor.UNREGISTER"/>
<action android:name="org.unifiedpush.android.distributor.feature.BYTES_MESSAGE"/>
2021-12-29 20:33:17 +01:00
</intent-filter>
</receiver>
<!-- Broadcast receiver for the "Download"/"Cancel" attachment action in the notification popup -->
<receiver
2022-04-17 04:32:29 +02:00
android:name=".msg.NotificationService$UserActionBroadcastReceiver"
android:enabled="true"
android:exported="false">
</receiver>
2021-11-24 22:12:51 +01:00
<!-- Firebase messaging (note that this is empty in the F-Droid flavor) -->
2021-10-31 20:19:25 +01:00
<service
2021-11-24 22:12:51 +01:00
android:name=".firebase.FirebaseService"
2021-10-31 20:19:25 +01:00
android:exported="false">
2021-10-30 03:13:58 +02:00
<intent-filter>
2021-10-31 20:19:25 +01:00
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
2021-10-30 03:13:58 +02:00
</intent-filter>
</service>
2021-10-31 20:19:25 +01:00
<meta-data
android:name="firebase_analytics_collection_enabled"
android:value="false"/>
2021-10-30 03:13:58 +02:00
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
2021-11-23 16:52:27 +01:00
android:resource="@drawable/ic_notification"/>
<!-- FileProvider required for older Android versions (<= P), to allow passing the file URI in the open intent.
2022-01-20 03:05:41 +01:00
Avoids "exposed beyond app through Intent.getData" exception, see see https://stackoverflow.com/a/57288352/1440785 -->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"/>
</provider>
</application>
</manifest>