{"__v":55,"_id":"55e67c3cde6fef23009480d1","category":{"__v":35,"_id":"55e67b5556007d23005fee7d","pages":["55e67b91de6fef23009480cb","55e67c28de6fef23009480ce","55e67c3cde6fef23009480d1","55e680e185a9741900314e96","55e682b7de6fef23009480dc","55ecd69bb2714d2100f227c0","55ecd6c554a67b1700edcf40","55ecd6edae66a30d00446ce7","55ecd777b2714d2100f227c2","55ecda5a7659d21700a7ef9b","55ecdaf6ae66a30d00446cf3","55ed006a0d968e2100de831e","55ed0258c9d5b3350072ae7a","55ee66a073d3941700f760e5","55f5ef61a1dea80d00a5dec5","55f5f38618b39b0d00c27eb0","55f9f86417b9d00d00969e29","55f9fdc8aba81f0d00a1156d","561b10b4c89cc30d0082154f","561b110a03bce90d00c4bd11","561c6195ad272c0d00a892dd","561c6ca0be5fb20d00077754","564f3e66c133343500286ca0","565b955b922c9a0d00d1f124","566784d2919aaa0d008e32db","566e1ee5972a290d00552084","569c58d77c3e44170014114f","56a2692f6928550d006c8327","56ca6c868014e417002bfe54","56cfa5386c5d7a13005eec0f","56e73d86555c030e00a52a73","56e7460c9000b120000ffe2e","56e8c19e99c6400e003820cf","56e8c53fc88bf80e00f8bed8","56f06ff4d386ce0e008e9b21"],"project":"55e67aaa9cc7c62b00c4a1ea","version":"55e67aab9cc7c62b00c4a1ed","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-02T04:30:13.305Z","from_sync":false,"order":1,"slug":"install-in-your-app","title":"Install in your app"},"parentDoc":null,"project":"55e67aaa9cc7c62b00c4a1ea","user":"55d2bd8e2463351700f67dd7","version":{"__v":10,"_id":"55e67aab9cc7c62b00c4a1ed","project":"55e67aaa9cc7c62b00c4a1ea","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["55e67aac9cc7c62b00c4a1ee","55e67b5556007d23005fee7d","55e67b5dde6fef23009480ca","55e680efde6fef23009480db","55e6829485a9741900314e99","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","589b8e1fdbb7cd190026732c","58b8ca5e3265d70f001788d4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["562031599f539e0d002d664a"],"next":{"pages":[],"description":""},"createdAt":"2015-09-02T04:34:04.234Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"In addition to [Push Notifications](doc:setting-up-push-notifications), Carnival supports In App messaging. These messages are a created separately to notifications, but can have an attached push notification. In App Messages can be displayed in three ways: \n\n# In-App Notifications\n\nCarnival's In-app messages are banner notifications that appear inside of your app. In-app notifications allow users to see messages as they browse your app, no matter what they are doing. They also allow you to reach users who have opted to not receive push notifications.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ac334b1-IAN.png\",\n        \"IAN.png\",\n        256,\n        512,\n        \"#34585a\"\n      ],\n      \"caption\": \"In App Notification\"\n    }\n  ]\n}\n[/block]\n## In App Notification Display\n\nThere are two times Carnival will try to display an In App Notification\n  * After launch: If there is an unseen message, this will be presented to the user. Only the latest sent message will be shown.\n  * If the user has your app open, and a message arrives with a push attached to it, this will present an In App Notification. \n\n## In App Notification and Push flow\nIn-app messages work with or without push notifications, and vice versa. You can enable multiple scenarios ranging from the most impactful and immediate (push) to the less obtrusive (in-app message with no notification).\n\n### Push notification only\n - People receive a push notification, based on having a valid token or having opted into push\n - Tapping on the push notification will open the app, or lead to a deep link (if it has been added as a key [key-value payload](https://docs.carnival.io/v1.0/docs/key-value-payloads#section-deep-linking-with-key-value-payloads))\n\n### In-app message with push (including silent push)\nIf the app is closed, and the user has opted in for push notifications:\n - The user will receive the push notification\n - If the user taps on push, the notification will take the user to the full screen message detail or a deep link or lead to a deep link (if it has been added as a key [key-value payload](https://docs.carnival.io/v1.0/docs/key-value-payloads#section-deep-linking-with-key-value-payloads))\nIf the user doesn't tap on the push when it's received, they will see it as an in-app notification the next time they open the app (or whatever the latest unread message is)\n\nIf the app is open (in other words, if it is the active app in foreground):\n- If the user has opted into push notifications, the user will receive the in-app notification. Tapping on the notification leads to the full screen detail page (for Link messages with deep links, it will lead to the deep link).\n- If app is closed, or if the user has not opted into push notifications, the next time the user opens the app, they will receive an in-app notification with the last unread message. Tapping on the notification leads to the full screen detail page (for Link messages with deep links, it will lead to the deep link).\n- In both of the above scenarios, or if the user doesn't tap on the in-app notification, the message will just be in the stream for them to self-navigate to.\n\n### In-app only message (with no push attached) \nIf the user is in the app at time of message send, the message will simply appear in the Message Stream. When the user navigates to the stream, the stream calls to Carnival for latest messages.\nIf the user doesn't self-navigate to the stream, the next time they open the app, they will see the last unread message as an in-app notification.\n\n## Customizing In App Notifications\n\nIn-app notifications work out of the box and don't require any extra development. If you would like to create your own notification that suits the look and feel of your app, please read  [Customizing In App Notifications](doc:customizing-in-app-notifications).\n\n## Delay In App Notification Presentation\n\nIn App Notifications appear at first launch, but it is [possible to delay them](http://docs.carnival.io/v1.0/docs/delaying-in-app-notifications) to when it suits your apps, perhaps after login or after user onboarding.\n\nTapping an In App Notification will, by default, take load the Full Screen Message for that that message.\n\n# Full Screen Messages\n\nThis screen provides a full-screen, detailed view of the message. Full Screen Messages appear when a user taps on a Push Notification (if attached) or an In App Notification. \n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7d674fe-full_screen.png\",\n        \"full screen.png\",\n        256,\n        512,\n        \"#445c64\"\n      ],\n      \"caption\": \"Full Screen Messages\"\n    }\n  ]\n}\n[/block]\n## Customizing Full Screen Messages\n\nFull Screen Messages work out of the box and don't require any extra development. If you would like to create your own screen that suits the look and feel of your app, please read [Customizing Full Screen Messages](http://docs.carnival.io/v1.0/docs/customizing-full-screen-messages)\n\n# Message Stream\n\nIn-App Notifications and Full Screen Messages are a great way to engage users as they are using the app, however once they have been shown to the user, there is no way to see them again.  \n\nA Message stream is the answer to this. It allows you to publish a list of messages in your app which is ideal for use cases where you want the user to be able to come back to the content in their own time. \n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0af4d6b-Group_2.png\",\n        \"Group 2.png\",\n        256,\n        512,\n        \"#c9ccce\"\n      ],\n      \"caption\": \"Message Stream\"\n    }\n  ]\n}\n[/block]\nThere are two ways to put a message stream inside your app. You can use/adapt our examples or build your own.\n\nFor more details, refer to our [Message Stream Overview](doc:message-stream) or learn how to [build a Message Stream](doc:developing-a-custom-message-stream).","excerpt":"","slug":"setting-up-in-app-messaging","type":"basic","title":"Setup In-App Messaging"}

Setup In-App Messaging


In addition to [Push Notifications](doc:setting-up-push-notifications), Carnival supports In App messaging. These messages are a created separately to notifications, but can have an attached push notification. In App Messages can be displayed in three ways: # In-App Notifications Carnival's In-app messages are banner notifications that appear inside of your app. In-app notifications allow users to see messages as they browse your app, no matter what they are doing. They also allow you to reach users who have opted to not receive push notifications. [block:image] { "images": [ { "image": [ "https://files.readme.io/ac334b1-IAN.png", "IAN.png", 256, 512, "#34585a" ], "caption": "In App Notification" } ] } [/block] ## In App Notification Display There are two times Carnival will try to display an In App Notification * After launch: If there is an unseen message, this will be presented to the user. Only the latest sent message will be shown. * If the user has your app open, and a message arrives with a push attached to it, this will present an In App Notification. ## In App Notification and Push flow In-app messages work with or without push notifications, and vice versa. You can enable multiple scenarios ranging from the most impactful and immediate (push) to the less obtrusive (in-app message with no notification). ### Push notification only - People receive a push notification, based on having a valid token or having opted into push - Tapping on the push notification will open the app, or lead to a deep link (if it has been added as a key [key-value payload](https://docs.carnival.io/v1.0/docs/key-value-payloads#section-deep-linking-with-key-value-payloads)) ### In-app message with push (including silent push) If the app is closed, and the user has opted in for push notifications: - The user will receive the push notification - If the user taps on push, the notification will take the user to the full screen message detail or a deep link or lead to a deep link (if it has been added as a key [key-value payload](https://docs.carnival.io/v1.0/docs/key-value-payloads#section-deep-linking-with-key-value-payloads)) If the user doesn't tap on the push when it's received, they will see it as an in-app notification the next time they open the app (or whatever the latest unread message is) If the app is open (in other words, if it is the active app in foreground): - If the user has opted into push notifications, the user will receive the in-app notification. Tapping on the notification leads to the full screen detail page (for Link messages with deep links, it will lead to the deep link). - If app is closed, or if the user has not opted into push notifications, the next time the user opens the app, they will receive an in-app notification with the last unread message. Tapping on the notification leads to the full screen detail page (for Link messages with deep links, it will lead to the deep link). - In both of the above scenarios, or if the user doesn't tap on the in-app notification, the message will just be in the stream for them to self-navigate to. ### In-app only message (with no push attached) If the user is in the app at time of message send, the message will simply appear in the Message Stream. When the user navigates to the stream, the stream calls to Carnival for latest messages. If the user doesn't self-navigate to the stream, the next time they open the app, they will see the last unread message as an in-app notification. ## Customizing In App Notifications In-app notifications work out of the box and don't require any extra development. If you would like to create your own notification that suits the look and feel of your app, please read [Customizing In App Notifications](doc:customizing-in-app-notifications). ## Delay In App Notification Presentation In App Notifications appear at first launch, but it is [possible to delay them](http://docs.carnival.io/v1.0/docs/delaying-in-app-notifications) to when it suits your apps, perhaps after login or after user onboarding. Tapping an In App Notification will, by default, take load the Full Screen Message for that that message. # Full Screen Messages This screen provides a full-screen, detailed view of the message. Full Screen Messages appear when a user taps on a Push Notification (if attached) or an In App Notification. [block:image] { "images": [ { "image": [ "https://files.readme.io/7d674fe-full_screen.png", "full screen.png", 256, 512, "#445c64" ], "caption": "Full Screen Messages" } ] } [/block] ## Customizing Full Screen Messages Full Screen Messages work out of the box and don't require any extra development. If you would like to create your own screen that suits the look and feel of your app, please read [Customizing Full Screen Messages](http://docs.carnival.io/v1.0/docs/customizing-full-screen-messages) # Message Stream In-App Notifications and Full Screen Messages are a great way to engage users as they are using the app, however once they have been shown to the user, there is no way to see them again. A Message stream is the answer to this. It allows you to publish a list of messages in your app which is ideal for use cases where you want the user to be able to come back to the content in their own time. [block:image] { "images": [ { "image": [ "https://files.readme.io/0af4d6b-Group_2.png", "Group 2.png", 256, 512, "#c9ccce" ], "caption": "Message Stream" } ] } [/block] There are two ways to put a message stream inside your app. You can use/adapt our examples or build your own. For more details, refer to our [Message Stream Overview](doc:message-stream) or learn how to [build a Message Stream](doc:developing-a-custom-message-stream).