We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 189f571 commit 5d7515dCopy full SHA for 5d7515d
1 file changed
android_notify/an_utils.py
@@ -156,7 +156,16 @@ def icon_finder(icon_name):
156
package_dir = get_package_path()
157
return os.path.join(package_dir, "fallback-icons", icon_name)
158
159
+def can_show_permission_request_popup():
160
+ """
161
+ Check if we can show permission request popup for POST_NOTIFICATIONS
162
+ :return: bool
163
164
+ if not ON_ANDROID or BuildVersion.SDK_INT < 33:
165
+ return False
166
167
+ return context.shouldShowRequestPermissionRationale(Manifest.POST_NOTIFICATIONS)
168
+
169
def open_settings_screen():
170
intent = Intent()
171
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
0 commit comments