How to view unread/un-clicked notifications in Inbox

Task or Objective to be achieved:

 To show unread/unclicked notifications in Inbox

Steps to be carried out:

  • Make sure that the SDK Version is above 4.4.0, and confirm if you have implemented Notification Service Extension as mentioned here.
  • Along with it make sure that the App Group IDs are set correctly for both the App Target and the Service Extension target.

 Example to set the app group id in capabilities as well as the code

  1. First, select your App Target and select Capabilities do the changes as shown in the image below:
    mceclip0.png
  2. Make sure you set the same app group id in code as well. In this example the app group id is 'group.com.moengage.SampleApp.MoEngage'.
  3. Provide the App Group ID selected in Capabilities tab by calling setAppGroupID: method before initializing the SDK as shown below:
    MoEngage.setAppGroupID("group.com.moengage.SampleApp.MoEngage")
  4. Turn ON App Groups in for your Notification Service Extension target and enable the same App group id which was selected for the App Target(In the above steps).
    mceclip2.png
  5. In Notification Service Extension class : Set the App Group ID selected in the settings earlier using setAppGroupID: method.
    MoRichNotification.setAppGroupID("group.com.moengage.SampleApp.MoEngage")

Solution and steps to verify the end result

  1. Send out a push notification from MoEngage Dashboard to your test device. 
  2. Without clicking on the notification / Without opening the notification, Launch your app and navigate to Inbox screen.
  3. You should be able to view the unclicked/unread notification along with other notifications.
Was this article helpful?
0 out of 0 found this helpful