Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Add runtime notification permissions for Android 13#32

Open
spoorthipujariadobe wants to merge 2 commits intoadobe:mainfrom
spoorthipujariadobe:add_runtime_notification_permission
Open

Add runtime notification permissions for Android 13#32
spoorthipujariadobe wants to merge 2 commits intoadobe:mainfrom
spoorthipujariadobe:add_runtime_notification_permission

Conversation

@spoorthipujariadobe
Copy link

@spoorthipujariadobe spoorthipujariadobe commented Mar 13, 2023

Description

Adding runtime notification permission request for Android version >= 13

Related Issue

Motivation and Context

Required behavior change since API 33 https://developer.android.com/develop/ui/views/notifications/notification-permission

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.


private void askNotificationPermission() {
// This is only necessary for API level >= 33 (TIRAMISU)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sense to move this check to line 57 instead?

Copy link
Contributor

@rymorale rymorale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a minor question on the version check but it looks good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants