From 92ec2d753f4c0a999d4ced5d508be548f4bb03bd Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Fri, 18 Nov 2022 21:08:12 -0500 Subject: [PATCH] Ask for permission to post notifications (SDK 33) --- app/src/main/AndroidManifest.xml | 1 + .../main/java/io/heckel/ntfy/ui/MainActivity.kt | 15 +++++++++++++++ fastlane/metadata/android/en-US/changelog/29.txt | 1 + 3 files changed, 17 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cbdab92..4cbdf60 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -10,6 +10,7 @@ + = Build.VERSION_CODES.TIRAMISU && ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_DENIED) { + ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.POST_NOTIFICATIONS), 0) + } } override fun onResume() { diff --git a/fastlane/metadata/android/en-US/changelog/29.txt b/fastlane/metadata/android/en-US/changelog/29.txt index c351454..ca7a060 100644 --- a/fastlane/metadata/android/en-US/changelog/29.txt +++ b/fastlane/metadata/android/en-US/changelog/29.txt @@ -1,5 +1,6 @@ Bug fixes + maintenance: * Upgrade Android dependencies to SDK 33 (no ticket) +* Android 13: Ask for permission to post notifications (#508) * Remove timestamp when copying message text (#471, thanks to @wunter8) Additional translations: