By now, you might be aware of NPSettings. In-case if its new to you, read this post.
In your Unity project, If Notification Service is not enabled, enable by below steps.
- Open NPSettings and select Application Settings.
- Under supported features section, Enable Uses Notification Service checkbox and Save (see button at bottom).
Once you have Notification Service feature enabled, select Notification Service Settings. Let us take a brief look into it:
- User Info Key : key used in notification payload/data for holding custom user info.
- Sender ID’s : Set your sender ID’s for registering with GCM. This is MUST to use push/remote notifications on android._
- White Small Icon – From Android 5.0 devices, Notifications small icons need to be of this style. More info here.
- Coloured Small Icon – This will be picked when the app is running on pre Android 5.0 devices.
Payload Keys for Remote Notification
- Payload keys lets you configure key names in the notification payload. This will be handy if you are trying to adopt Cross Platform Native Plugins to an existing project or if you are using some third party servie for sending notifications where payload keys are different.
|Ticker Text Key||Key for specifying ticker text on pre Android 5.0 devices.|
|Content Text Key||Key for specifying content text.|
|Content Title Key||Key for specifying content title.|
|User Info Key||Key used in notification for holding custom user info.|
|Tag Key||Key used in notification for holding custom user info.|
Tag key value if set unique, it will have a new entry in notification center. Else it will replace existing notification displayed.
For holding custom data , use User Info Key and set a dictionary JSON in the payload data.
That's it! Save all your NPSettings changes by clicking Save button at bottom of the inspector.
Find payload examples at bottom of this post.