Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android notification structure #31

Merged
merged 4 commits into from
Dec 8, 2016
Merged

Conversation

nilsen340
Copy link
Member

@nilsen340 nilsen340 commented Dec 8, 2016

Android notification structure

The current structure of the notification payload on android does not allow for customisation on the client side. When a notification object is present the only customisation possible is the notification icon and the primary color.

Proposed solution

Replace the notification message with a data message. Documentation on both types can be found here

  1. Add the data from the notification object to the data object.
  2. Put the data object on the top level
  3. Remove the notification object.

The names of the fields in the notification object could be the same in the data object. This way the client has to manually handle their notifications, which gives it the liberty to customise the design.

This solution would also be more extensible than the previous solution as it allows for custom fields (i.e. user avatars etc).

@nilsen340 nilsen340 changed the title Initial commit for the android notification structure PR Android notification structure Dec 8, 2016
nilsen340 and others added 4 commits December 8, 2016 11:15
To give more power to the client implementation for how to present
notifications we move away from triggering system native notifications
and just move to a plain data object container. This will help with
extending the data model in the future.
@xla xla force-pushed the android-notification-structure branch from 9ba186e to 8315502 Compare December 8, 2016 10:15
@xla xla self-assigned this Dec 8, 2016
@xla xla merged commit f68774e into master Dec 8, 2016
@xla xla deleted the android-notification-structure branch December 8, 2016 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants