Add notifications management delegate methods to CarPlayManagerDelegate. - #3828
Merged
MaximAlien merged 3 commits intoApr 19, 2022
Merged
MaximAlien merged 3 commits into
MaximAlien merged 3 commits into
Conversation
S2Ler
reviewed
Apr 15, 2022
Comment on lines
+331
to
+332
| Determines if the maneuver should be presented as a notification when the app is in the | ||
| background. |
Contributor
There was a problem hiding this comment.
Curious why it can't control notifications when the app isn't in the background?
Contributor
Author
There was a problem hiding this comment.
It seems that CarPlay behavior is similar to iOS, when iOS app is in foreground notification will not be shown. Interestingly UNUserNotificationCenter also allows to show generic notification on CarPlay using something like:
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge, .carPlay]) { granted, error in
UNUserNotificationCenter.current().getNotificationSettings { notificationSettings in
print("carPlaySetting: \(notificationSettings.carPlaySetting.rawValue)")
}
}but carPlaySetting is always disabled. Not sure if it's a problem on my side or it's not really supported after all.
ShanMa1991
approved these changes
Apr 19, 2022
…For:with:in:)` and `CarPlayManager.carPlayManager(_:shouldShowNotificationFor:in:)` methods that allow to control notifications presentation on CarPlay.
MaximAlien
force-pushed
the
maxim/3827-add-notifications-related-delegate-methods-on-car-play
branch
from
April 19, 2022 21:19
89f5618 to
ef92c2c
Compare
MaximAlien
deleted the
maxim/3827-add-notifications-related-delegate-methods-on-car-play
branch
April 19, 2022 21:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR adds
CarPlayManagerDelegate.carPlayManager(_:shouldUpdateNotificationFor:with:in:)andCarPlayManagerDelegate.carPlayManager(_:shouldShowNotificationFor:in:)methods that allow to control notifications presentation on CarPlay while application is in background.