aws-amplify / aws-amplify/amplify-android
PushNotificationPermission should also consider the NotificationChannel state to determine whether a notification can be sent.
- Dominant language
- Java
- Stars
- 287
- Forks
- 132
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 45
Description
### Before opening, please confirm:
- [x] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-android/issues?q=is%3Aissue+) and [discussions](https://github.com/aws-amplify/amplify-android/discussions).
### Language and Async Model
Kotlin
### Amplify Categories
Notifications
### Gradle script dependencies
```kts
// Put output below this line
dependencies {
implementation(libs.aws.android.sdk.mobile.client)
implementation(libs.aws.android.sdk.pinpoint)
implementation(libs.amplify.analytics.pinpoint)
implementation(libs.amplify.auth.cognito)
implementation(libs.amplify.push.notifications.pinpoint)
}
```
### Environment information
I don't think it matters.
```
# Put output below this line
------------------------------------------------------------
Gradle 8.7
------------------------------------------------------------
Build time: 2024-03-22 15:52:46 UTC
Revision: 650af14d7653aa949fce5e886e685efc9cf97c10
Kotlin: 1.9.22
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.11 (Homebrew 17.0.11+0)
OS: Mac OS X 14.5 aarch64
```
### Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/gen1/android/build-a-backend/push-notifications/set-up-push-notifications/
### Describe the bug
I would like to use [PushNotificationPermission](https://github.com/aws-amplify/amplify-android/blob/main/aws-push-notifications-pinpoint-common/src/main/java/com/amplifyframework/pushnotifications/pinpoint/permissions/PushNotificationPermission.kt), but this does not seem to include the decision whether the notification channel is enabled.
### Reproduction steps (if applicable)
_No response_
### Code Snippet
```kotlin
// Put your code below this line.
```
### Log output
```
// Put your logs below this line
```
### amplifyconfiguration.json
_No response_
### GraphQL Schema
```graphql
// Put your schema below this line
```
### Additional information and screenshots
_No response_
Contributor guide
Research direction
Start with aws-push-notifications-pinpoint-common/src/main/java/com/amplifyframework/pushnotifications/pinpoint/permissions/PushNotificationPermission.kt and review the linked push-notifications setup guide for permission behavior. Determine how the Android NotificationChannel state should affect whether notifications can be sent, then verify that PushNotificationPermission reflects both permission and channel decisions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100