Android small icon support for unified notifications - #451
Open
aurimasc wants to merge 3 commits into
Open
Conversation
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.
https://jira.unity3d.com/browse/PLAT-21686
On Android notifications are required to have small icon. Unity APIs do not require it, we use app icon if not provided.
Unified notifications API does not allow to set icon as there is no such thing on iOS. However, there were user complains in the past that using something else than app icon is desirable. This PR adds ability to set small icon to NotificationCenter. This we we keep things the way they are - small icon cannot be set on notification, but user can configure the icon to be used on all notifications sent via unified APIs. If user wants to set icon per-notification, android specific notification API should be used instead of unified one.
Couple unrelated changes: one link in documentation does not work due to class not being fully qualified and a possible null exception was noticed for iOS (very low probability, only would happen in a scenario where notification would not work anyway due to not being setup properly).
Tested using Main test project (Unified scene). Icon is set up there and shows correctly. The scenario without icon is covered by automated tests.