{"_id":"5b290fb8f11cd000039cade3","project":"55dd9f2e0efd5821000d54d9","version":"55dd9f4dab0e4d210045aae9","category":"5b34ded01cb20f000391ad6d","user":"5a251846c297dc0012e531cd","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-19T14:14:16.168Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"To [send push notifications from dotmailer to your app](https://support.dotmailer.com/hc/en-gb/articles/360001827870), you need to do the following:\n[block:html]\n{\n  \"html\": \"<div id=\\\"userMap\\\">\\n<div class=\\\"content\\\"><a href=\\\"https://developer.dotmailer.com/v2/docs/creating-a-push-notification-profile#in-dotmailer\\\"><div class=\\\"box box1\\\">Create a push notification profile in dotmailer</div></a></div>\\n<div class=\\\"arrow\\\">→</div>\\n<div class=\\\"content\\\"><a href=\\\"https://developer.dotmailer.com/v2/docs/creating-a-json-web-token\\\"><div class=\\\"box box2\\\">Create a JSON Web Token</div></a></div>\\n<div class=\\\"arrow\\\">→</div>\\n<div class=\\\"content\\\"><a href=\\\"https://developer.dotmailer.com/v2/docs/setting-up-push-notifications#section-mobile-sdk-options\\\"><div class=\\\"box box3\\\">Use one of our mobile SDKs in your app</div></a></div>\\n<div class=\\\"clearfix\\\"></div></div>\\n\\n<style>\\n  .box {\\n    padding: 10px;\\n    border: 2px solid #000;\\n    width: 120px;\\n    height: 120px;\\n    background-color: #EAEAEA;\\n    hyphens: auto;\\n    float: left;\\n    font-size: 12px;\\n}\\n\\n.box:hover {\\n    background-color: #82bc42;\\n}\\n\\n#userMap {\\n    overflow-x: auto;\\n    overflow-y: auto;\\n    padding: 20px;\\n    min-width: 770px;\\n}\\n\\n#userMap a:hover {\\n    text-decoration: none;\\n  }\\n\\ndiv.arrow {\\n    max-width: 50px;\\n    margin-left: 15px;\\n    margin-right: 15px;\\n    font-size: 50px;\\n}\\n\\n\\n#userMap div.arrow, #userMap div.content {\\n    float: left;\\n}\\n\\n.clearfix {\\n    clear: both;\\n}\\n\\n\\n#userMap div.arrow {\\n    position: relative;\\n    top: 45px;\\n}\\n\\n.box1 {\\n    margin-left:0px;\\n}\\n\\ndiv.box.box1 {\\n    margin-left: -20px;\\n}\\n</style>\"\n}\n[/block]\n# Mobile SDK options\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Supported iOS and Android versions\",\n  \"body\": \"Our mobile SDKs support the latest versions of Android and iOS, as well as the previous two versions.\"\n}\n[/block]\nAfter you've created a [push notification profile in dotmailer](doc:creating-a-push-notification-profile), and you have a [class or function that creates a JSON Web Token](doc:creating-a-json-web-token), the next step is to use one of our SDKs to register a profile for each of your app users, and to add an email address to each profile.\n\nWhen a profile is updated with an email address, dotmailer receives the profile data and starts checking for contacts who have the same email address.\n\nUsers can be sent push notifications only if their profiles have an email address that belongs to one of your dotmailer contacts.\n\nSelect one of the following mobile SDKs to add to your app, depending on your development environment:\n\n* [Android SDK for native Android apps (Java)](https://developer.dotmailer.com/v2/docs/android-sdk) \n* [iOS SDK for native iOS apps (Swift)](https://developer.dotmailer.com/v2/docs/ios-sdk)\n* [JavaScript SDK for cross-platform apps (Android or iOS)](https://developer.dotmailer.com/v2/docs/javascript-sdk)","excerpt":"A tutorial for setting up your app to receive push notifications from the program builder in dotmailer","slug":"setting-up-push-notifications","type":"basic","title":"Setting up push notifications","__v":0,"parentDoc":null,"childrenPages":[]}

Setting up push notifications

A tutorial for setting up your app to receive push notifications from the program builder in dotmailer

To [send push notifications from dotmailer to your app](https://support.dotmailer.com/hc/en-gb/articles/360001827870), you need to do the following: [block:html] { "html": "<div id=\"userMap\">\n<div class=\"content\"><a href=\"https://developer.dotmailer.com/v2/docs/creating-a-push-notification-profile#in-dotmailer\"><div class=\"box box1\">Create a push notification profile in dotmailer</div></a></div>\n<div class=\"arrow\">→</div>\n<div class=\"content\"><a href=\"https://developer.dotmailer.com/v2/docs/creating-a-json-web-token\"><div class=\"box box2\">Create a JSON Web Token</div></a></div>\n<div class=\"arrow\">→</div>\n<div class=\"content\"><a href=\"https://developer.dotmailer.com/v2/docs/setting-up-push-notifications#section-mobile-sdk-options\"><div class=\"box box3\">Use one of our mobile SDKs in your app</div></a></div>\n<div class=\"clearfix\"></div></div>\n\n<style>\n .box {\n padding: 10px;\n border: 2px solid #000;\n width: 120px;\n height: 120px;\n background-color: #EAEAEA;\n hyphens: auto;\n float: left;\n font-size: 12px;\n}\n\n.box:hover {\n background-color: #82bc42;\n}\n\n#userMap {\n overflow-x: auto;\n overflow-y: auto;\n padding: 20px;\n min-width: 770px;\n}\n\n#userMap a:hover {\n text-decoration: none;\n }\n\ndiv.arrow {\n max-width: 50px;\n margin-left: 15px;\n margin-right: 15px;\n font-size: 50px;\n}\n\n\n#userMap div.arrow, #userMap div.content {\n float: left;\n}\n\n.clearfix {\n clear: both;\n}\n\n\n#userMap div.arrow {\n position: relative;\n top: 45px;\n}\n\n.box1 {\n margin-left:0px;\n}\n\ndiv.box.box1 {\n margin-left: -20px;\n}\n</style>" } [/block] # Mobile SDK options [block:callout] { "type": "info", "title": "Supported iOS and Android versions", "body": "Our mobile SDKs support the latest versions of Android and iOS, as well as the previous two versions." } [/block] After you've created a [push notification profile in dotmailer](doc:creating-a-push-notification-profile), and you have a [class or function that creates a JSON Web Token](doc:creating-a-json-web-token), the next step is to use one of our SDKs to register a profile for each of your app users, and to add an email address to each profile. When a profile is updated with an email address, dotmailer receives the profile data and starts checking for contacts who have the same email address. Users can be sent push notifications only if their profiles have an email address that belongs to one of your dotmailer contacts. Select one of the following mobile SDKs to add to your app, depending on your development environment: * [Android SDK for native Android apps (Java)](https://developer.dotmailer.com/v2/docs/android-sdk) * [iOS SDK for native iOS apps (Swift)](https://developer.dotmailer.com/v2/docs/ios-sdk) * [JavaScript SDK for cross-platform apps (Android or iOS)](https://developer.dotmailer.com/v2/docs/javascript-sdk)