CINXE.COM

ADM Message Types | Amazon Device Messaging

<!doctype html><!--[if IE 8]><html data-19ax5a9jf="dingo" lang="en_US" class="a-no-js a-lt-ie10 a-lt-ie9 a-ie8"><![endif]--><!--[if IE 9]><html data-19ax5a9jf="dingo" lang="en_US" class="a-no-js a-lt-ie10 a-ie9"><![endif]--><!--[if !(IE 8)&!(IE 9)]><!--><html data-19ax5a9jf="dingo" lang="en_US" class="a-no-js"><!--<![endif]--> <head><script>var aPageStart = (new Date()).getTime();</script><meta charset="utf-8"/> <link rel="stylesheet" href="https://images-na.ssl-images-amazon.com/images/I/11EIQ5IGqaL._RC|01e5ncglxyL.css,01lF2n-pPaL.css,41DLtM-IPiL.css,31iNSIr1kuL.css,011DCEwfbwL.css,013z33uKh2L.css,01R9dtRDQdL.css,01rhj7BIeEL.css,410iOIpxjqL.css,11TIuySqr6L.css,01ElnPiDxWL.css,114oHnH0QRL.css,01crd53+KxL.css,01IdKcBuAdL.css,01y-XAlI+2L.css,01RgENaJKWL.css,219sMS379pL.css,01oDR3IULNL.css,51CguxBmgsL.css,01XPHJk60-L.css,01lN1FNc-RL.css,21Z4Q-IpuWL.css,11MrAKjcAKL.css,21qHKSTSJCL.css,11Zh8bU-hoL.css,01CFUgsA-YL.css,31jsrAUX5KL.css,11WHSxzwhML.css,11MO3b1rxzL.css,11ylgxpE+pL.css,11b-GR26DVL.css,01j2JE3j7aL.css,11maZ3sCvAL.css,21+98GSaU1L.css,11TxiWYBNOL.css,01chhhuYckL.css,21Q7cg1AwNL.css,1128pDOWgAL.css,11mA7+zB7BL.css,01G+-woTSUL.css,01890+Vwk8L.css,01b3+vZ+YbL.css,01cbS3UK11L.css,21kdNu0AlvL.css,0116OOHSwvL.css_.css?AUIClients/AmazonUI#us.trident" /> <link rel="stylesheet" href="https://images-na.ssl-images-amazon.com/images/I/71cTjwDJRNL.css?AUIClients/DeXWebsiteAUIAssets" /> <meta charset="utf-8"> <title>ADM Message Types | Amazon Device Messaging </title> <meta name="description" content="Amazon Device Messaging (ADM) offers push notifications (messages) that you can use to display messages about your app on a user's device. Make sure you have integrated your app..."> <meta name="keywords" content=""> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="icon" type="image/x-icon" href="https://amzndevresources.com/jekyll/css/favicon.ico"> <!-- FontAwesome (GPL license) --> <link rel="stylesheet" type="text/css" href="https://amzndevresources.com/jekyll/css/font-awesome/css/font-awesome.min.css"> <meta name="google-site-verification" content="wfEDah_6uJe9Y7uIfLrVycd_efr8wQ9YO-fM_5MI5w0" /> <meta name="google-site-verification" content="Eu8BqTWMhRRdfCAdqUh2RYb3SjAiuFp4wmgTtGcteM0" /> <link rel="alternate" href="https://developer.amazon.com/docs/adm/message-types.html" hreflang="en_US" /> <link rel="canonical" href="https://developer.amazon.com/docs/adm/message-types.html" /> <meta name="google-site-verification" content="KHmp6TUPKc1gHlM9TuB842pcV7TxZVV6TgenZtsYoNY" /> <meta name="msvalidate.01" content="9761B379C1B64F587D71BA40337FDD07" /> <script language="JavaScript" type="text/javascript"> var digitalData ={ page:{ pageInfo: { pageInstanceID: "docs\/adm\/message\-types.html", path: "\/docs\/adm\/message\-types.html", pageID: "", pageTitle: "", pageType: "DeX", primaryCategory: "appstore", pageName: "", language: "en_US" } }, user:{ userID: "", ipAddress: "8.222.208.146" } }; var urlSplit = "\/docs\/adm\/message\-types.html".split("/"); var trailingSlash = urlSplit.pop(); var pTitle = trailingSlash; if (trailingSlash == ""){ pTitle = urlSplit.pop() } if ("".indexOf("search") !== -1) { digitalData.page.pageInfo.searchResultsNum = ""; } if ("".indexOf("dex-home") !== -1){ digitalData.page.pageInfo.pageID = "Home"; digitalData.page.pageInfo.pageTitle = "Home"; digitalData.page.pageInfo.primaryCategory = "Home"; } else { digitalData.page.pageInfo.pageID = pTitle; pTitle = pTitle.replace(/(^|-)[a-z]/g,function(f){return f.toUpperCase();}); pTitle = pTitle.replace(/-/g, ''); digitalData.page.pageInfo.pageTitle = pTitle; var pCat = digitalData.page.pageInfo.primaryCategory; pCat = pCat.replace(/(^|-)[a-z]/g,function(f){return f.toUpperCase();}); pCat = pCat.replace(/-/g, ''); digitalData.page.pageInfo.primaryCategory = pCat; } var pageNameStr = "" + digitalData.page.pageInfo.primaryCategory; //Todo: add in logic for sub-categories when AOI is implemented. if (digitalData.page.pageInfo.pageTitle != null){ if (pageNameStr != ""){ pageNameStr += ":"; } pageNameStr += digitalData.page.pageInfo.pageTitle; } digitalData.page.pageInfo.pageName = pageNameStr; (function (w) { w.URLSearchParams = w.URLSearchParams || function (searchString) { var self = this; self.searchString = searchString; self.get = function (name) { var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(self.searchString); if (results == null) { return null; } else { return decodeURI(results[1]) || 0; } }; } })(window); </script> <script src="https://m.media-amazon.com/images/G/01/envImprovement/js/jquery/jquery-3.5.1.min.js" crossorigin="anonymous"></script> <script src="https://ds6yc8t7pnx74.cloudfront.net/content/dam/developer-portal/analytics/prod/launch-EN968f8a7401fc4ccea43ced61e7b0c2bb.min.js" async></script> <link rel="stylesheet" type="text/css" href="https://d20632htc2msyc.cloudfront.net/static/css/main.css" /> <script defer src="https://d20632htc2msyc.cloudfront.net/static/js/main.js"></script> <script type="text/javascript"> (function() { var didInit = false; function initMunchkin() { if(didInit === false) { didInit = true; Munchkin.init('365-EFI-026'); } } var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//munchkin.marketo.net/munchkin.js'; s.onreadystatechange = function() { if (this.readyState == 'complete' || this.readyState == 'loaded') { initMunchkin(); } }; s.onload = initMunchkin; document.getElementsByTagName('head')[0].appendChild(s); })(); </script> </head> <body class="a-m-us a-aui_72554-c a-aui_a11y_1_699934-c a-aui_a11y_4_835613-c a-aui_a11y_6_837773-c a-aui_a11y_sr_678508-c a-aui_killswitch_csa_logger_372963-c a-aui_pci_risk_banner_210084-c a-aui_preload_261698-c a-aui_rel_noreferrer_noopener_309527-c a-aui_template_weblab_cache_333406-c a-aui_tnr_v2_180836-c"><div id="a-page"><script type="a-state" data-a-state="{&quot;key&quot;:&quot;a-wlab-states&quot;}">{"AUI_A11Y_6_837773":"C","AUI_TNR_V2_180836":"C","AUI_PRELOAD_261698":"C","AUI_TEMPLATE_WEBLAB_CACHE_333406":"C","AUI_72554":"C","AUI_A11Y_1_699934":"C","AUI_A11Y_4_835613":"C","AUI_KILLSWITCH_CSA_LOGGER_372963":"C","AUI_A11Y_SR_678508":"C","AUI_REL_NOREFERRER_NOOPENER_309527":"C","AUI_PCI_RISK_BANNER_210084":"C"}</script> <link rel="stylesheet" type="text/css" href="https://m.media-amazon.com/images/G/01/Fonts/FontAwesome/css/font-awesome.min._V516135338_.css"> <header class='dpHeader dphThemedark'> <div class='dphTopBar clearfix'> <div class='dphLeft'> <div class='dphMenuToggle'> <i class='dphMenuIcon'></i> <i class='dphMenuBackIcon'></i> </div> <a class='dphLogo' href='/apps-and-games'> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/logos/amazonAppstoreLogoDarkBG1x_new.png" srcset="https://m.media-amazon.com/images/G/01/mobile-apps/dex/logos/amazonAppstoreLogoDarkBG1x_new.png 1x, https://m.media-amazon.com/images/G/01/mobile-apps/dex/logos/amazonAppstoreLogoDarkBG2x.png 2x" alt="Amazon Developer Logo"> </a> </div> <div class='dphRight'> <div class="dphSearchBarWrap"> <!-- Used in tech docs to hide side bar search results when we rollout new search --> <script type="text/javascript"> window.newSearch = true; </script> <div hidden style="display: none;" class="new-search-flag" data-val="enabled"></div> <div hidden style="display: none;" class="new-search-metadata"> {"settingsUrl":"https://ds6yc8t7pnx74.cloudfront.net/devportal-digital-assets/cf/developer-portal/getDeXSearchData"} </div> <div id="dex-search-header-bar"> </div> </div> <a href="/home.html" class='dphConsole dphLink'>Developer Console</a> <div class='dphUserInfo'> <a class="dphLink" href="/settings/console/registration?return_to=/docs/adm/message-types.html">Sign In</a> </div> <style> #notification-counter { position: absolute; top: 2px; padding: 0 2px; min-width: 20px; background: #BF2727; color: white; font-size: 11px; border-radius: 3px; line-height: 20px; text-align: center; } #notification_click_icon { width: 32px; height: 32px; background-color: #31465f; text-align: center; line-height: 32px; border-radius: 50%; margin-right: 15px; color: white; font-weight: 300; cursor: pointer; } #notification-placeholder { position: absolute; top:45px; } #notification_flyout_iframe_id { display: none; position: absolute; width: 425px; border: none; transform: translate(-80%); transition: all 0.2s; } @media screen and (max-width: 992px) { #notification_click_icon { position: fixed; display: inline-block; right: 44px; } #notification_click_icon ~ .dphSearch.active { position: relative; z-index: 0; } #notification-placeholder { top:28px; } #notification-counter { top: -6px; } } @media screen and (max-width: 414px) { #notification_flyout_iframe_id { transform: none; right: -99px; width: 100vw; } #notification_click_icon ~ .dphSearch.active { position: relative; z-index: 0; } } </style> <div id='navFlyout?' class='dphFlyoutItem dphDevConsoleLinkTopBar dphButton'> <span class='dphConsole dphLink'>?</span> <div class='dphDropdownWrap'> <nav class='dphDropdown accrItem'> <div class='dpIconArrow accrHandle'></div> <ul class='dphDropdownList'> <li class='dphdItem'><a href='/support/'>Support</a></li> <li class='dphdItem'><a href='/documentation/'>Docs</a></li> <li class='dphdItem'><a href='/support/contact-us'>Contact Us</a></li> <li class='dphdItem'><a href='/support/cases'>My Appstore Cases</a></li> </ul> </nav> </div> </div> </div> </div> <div class='dphNavigation accordion' data-accr_active_width='327'> <div class='dphnWrap'> <div class='dphUserInfo'> <a class="dphLink" href="/settings/console/registration?return_to=/docs/adm/message-types.html">Sign In</a> </div> <a href="/home.html" class='dphConsole dphLink'>Developer Console</a> <nav class="dpPrimaryNav"> <ul class="dppnItems"> <li class="dppnItem accrItem"> <span class="dppnLink"> Devices </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnFlyoutWrap'> <div class='dppnSecondaryNavWrap'> <ul class="dppnFlyout dppnSecondaryNav"> <li class="dppnfItem accrItem"> <span class="dppnfLink"> <span class="dppnfTitle">Fire TV</span> <span class="dppnfSubtitle"></span> </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnLevel3NavWrap'> <ul class="dppnFlyout dppnLevel3Nav"> <li class="dppnfItem "> <a href="/apps-and-games/fire-tv" class="dppnfLink"> <span class="dppnfTitle">About</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/getting-started-developing-apps-and-games.html" class="dppnfLink"> <span class="dppnfTitle">Get started</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/device-specifications.html" class="dppnfLink"> <span class="dppnfTitle">Device specs</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/device-specifications-comparison-table.html" class="dppnfLink"> <span class="dppnfTitle">Compare devices</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/fire-os-overview.html" class="dppnfLink"> <span class="dppnfTitle">Fire OS for TV</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </li> <li class="dppnfItem accrItem"> <span class="dppnfLink"> <span class="dppnfTitle">Fire tablets</span> <span class="dppnfSubtitle"></span> </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnLevel3NavWrap'> <ul class="dppnFlyout dppnLevel3Nav"> <li class="dppnfItem "> <a href="/apps-and-games/fire-tablets" class="dppnfLink"> <span class="dppnfTitle">About</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tablets/ft-get-started.html" class="dppnfLink"> <span class="dppnfTitle">Get started</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tablets/ft-device-specifications.html" class="dppnfLink"> <span class="dppnfTitle">Device specs</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tablets/fire-os-8.html" class="dppnfLink"> <span class="dppnfTitle">Fire OS for tablets</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </li> </ul> </div> </div> </li> <li class="dppnItem accrItem"> <span class="dppnLink"> Build </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnFlyoutWrap'> <div class='dppnSecondaryNavWrap'> <ul class="dppnFlyout dppnSecondaryNav"> <li class="dppnfItem accrItem"> <span class="dppnfLink"> <span class="dppnfTitle">Fire TV apps</span> <span class="dppnfSubtitle"></span> </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnLevel3NavWrap'> <ul class="dppnFlyout dppnLevel3Nav"> <li class="dppnfItem "> <a href="/docs/fire-tv/getting-started-developing-apps-and-games.html" class="dppnfLink"> <span class="dppnfTitle">Get started</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/design-and-user-experience-guidelines.html" class="dppnfLink"> <span class="dppnfTitle">UX guidelines</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/remote-input.html" class="dppnfLink"> <span class="dppnfTitle">Remote control input</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/connecting-adb-to-device.html" class="dppnfLink"> <span class="dppnfTitle">Connect through Android Debug Bridge</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tv/self-service-advertising.html" class="dppnfLink"> <span class="dppnfTitle">Promote your TV app</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </li> <li class="dppnfItem accrItem"> <span class="dppnfLink"> <span class="dppnfTitle">Fire tablet apps</span> <span class="dppnfSubtitle"></span> </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnLevel3NavWrap'> <ul class="dppnFlyout dppnLevel3Nav"> <li class="dppnfItem "> <a href="/docs/fire-tablets/ft-get-started.html" class="dppnfLink"> <span class="dppnfTitle">Get started</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tablets/ft-ux-specifications.html" class="dppnfLink"> <span class="dppnfTitle">UX guidelines</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/fire-tablets/connecting-adb-to-device.html" class="dppnfLink"> <span class="dppnfTitle">Connect through Android Debug Bridge</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </li> <li class="dppnfItem accrItem"> <a href="/docs/apps-and-games/sdk-downloads.html" class="dppnfLink"> <span class="dppnfTitle">SDKs</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/app-submission/migrate-existing-app.html" class="dppnfLink"> <span class="dppnfTitle">Porting Android apps</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/apps-and-games/services-and-apis/monetization" class="dppnfLink"> <span class="dppnfTitle">Monetizing apps</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/apps-and-games/services-and-apis" class="dppnfLink"> <span class="dppnfTitle">Services & APIs</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/apps-and-games/blogs/tag.best-practices" class="dppnfLink"> <span class="dppnfTitle">Best practices</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </div> </li> <li class="dppnItem accrItem"> <span class="dppnLink"> Test </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnFlyoutWrap'> <div class='dppnSecondaryNavWrap'> <ul class="dppnFlyout dppnSecondaryNav"> <li class="dppnfItem accrItem"> <a href="/docs/app-testing/test-criteria.html" class="dppnfLink"> <span class="dppnfTitle">App testing criteria</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/app-testing/live-app-testing-getting-started.html" class="dppnfLink"> <span class="dppnfTitle">Live App Testing</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/in-app-purchasing/iap-testing-overview.html" class="dppnfLink"> <span class="dppnfTitle">In-app purchasing testing</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <span class="dppnfLink"> <span class="dppnfTitle">Quality performance</span> <span class="dppnfSubtitle"></span> </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnLevel3NavWrap'> <ul class="dppnFlyout dppnLevel3Nav"> <li class="dppnfItem "> <a href="/docs/app-testing/test-criteria.html#test-criteria-group-2-key-app-performance-indicators" class="dppnfLink"> <span class="dppnfTitle">Key performance indicators</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem "> <a href="/docs/app-testing/app-performance-scripts.html" class="dppnfLink"> <span class="dppnfTitle">App performance scripts</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </li> </ul> </div> </div> </li> <li class="dppnItem accrItem"> <span class="dppnLink"> Publish </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnFlyoutWrap'> <div class='dppnSecondaryNavWrap'> <ul class="dppnFlyout dppnSecondaryNav"> <li class="dppnfItem accrItem"> <a href="/docs/app-submission/understanding-submission.html" class="dppnfLink"> <span class="dppnfTitle">Publishing overview</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/policy-center/understanding-content-policy.html" class="dppnfLink"> <span class="dppnfTitle">App content policies</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/reports-promo/UI-reports-dashboard.html" class="dppnfLink"> <span class="dppnfTitle">Revenue reporting</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/app-submission/manage-account-and-permissions.html" class="dppnfLink"> <span class="dppnfTitle">Developer account management</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </div> </li> <li class="dppnItem accrItem"> <span class="dppnLink"> Connect </span> <div class='dpIconArrow accrHandle'></div> <div class='dppnFlyoutWrap'> <div class='dppnSecondaryNavWrap'> <ul class="dppnFlyout dppnSecondaryNav"> <li class="dppnfItem accrItem"> <a href="/apps-and-games/blogs" class="dppnfLink"> <span class="dppnfTitle">Blogs</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/apps-and-games/events" class="dppnfLink"> <span class="dppnfTitle">Events</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="https://community.amazondeveloper.com/" class="dppnfLink"> <span class="dppnfTitle">Appstore Developer Community</span> <span class="dppnfSubtitle"></span> </a> </li> <li class="dppnfItem accrItem"> <a href="/docs/apps-and-games/release-notes.html" class="dppnfLink"> <span class="dppnfTitle">Release notes</span> <span class="dppnfSubtitle"></span> </a> </li> </ul> </div> </div> </li> <li class="dppnItem accrItem"> <a href="/apps-and-games/documentation" class="dppnLink"> Docs </a> </li> </ul> </nav> <nav class="dpPrimaryNav dphDevConsoleLinkNavBar"> <ul class="dppnItems"> <li class="dppnItem accrItem"> <span class='dppnLink'>Support</span> <div class="dpIconArrow accrHandle"></div> <div class="dppnFlyoutWrap"> <div class="dppnSecondaryNavWrap"> <ul class='dppnFlyout dppnSecondaryNav'> <li class='dppnfItem accrItem'><a class="dppnfLink" href='/support/'><span class="dppnfTitle">Support</span></a></li> <li class='dppnfItem accrItem'><a class="dppnfLink" href='/documentation/'><span class="dppnfTitle">Docs</span></a></li> <li class='dppnfItem accrItem'><a class="dppnfLink" href='/support/contact-us'><span class="dppnfTitle">Contact Us</span></a></li> <li class='dppnfItem accrItem'><a class="dppnfLink" href='/support/cases'><span class="dppnfTitle">My Appstore Cases</span></a></li> </ul> </div> </div> </li> </ul> </nav> </div> </div> </header> <div id='dpHeaderPlaceholder'></div> <script> (function(){ //Set placeholder height as soon as possible to eliminate page jump "use strict"; var setHeaderPlaceholderHeight = function(header){ var placeholder = document.getElementById('dpHeaderPlaceholder'); var headerHeight = header[0].offsetHeight + "px"; placeholder.style.height = headerHeight; } var checkForHeader = function(){ var header = document.querySelectorAll('.dpHeader'); if(header.length){ setHeaderPlaceholderHeight(header); window.clearInterval(checkForHeaderInterval); } } var checkForHeaderInterval = window.setInterval(checkForHeader, 10); checkForHeader(); //Run once immediately }()); </script> <script> (function(a,b,c,d){if((a=a.AmazonUIPageJS||a.P)&&a.when&&a.register)throw Error("A copy of P has already been loaded on this page.");})(window,document,Date);(function(a,b,c,d){"use strict";a._pSetI=function(){return null}})(window,document,Date);(function(a,c,d,e){"use strict";a._sw=function(){var b;return function(a,c,d,e,f,g,h,k,l,m){b||(b=!0)}}()})(window,document,Date);(function(c,e,I,B){"use strict";c._pd=function(){var a,u;return function(C,f,h,k,b,D,v,E,F){function w(d){try{return d()}catch(J){return!1}}function l(){if(m){var d={w:c.innerWidth||b.clientWidth,h:c.innerHeight||b.clientHeight};5<Math.abs(d.w-q.w)||50<d.h-q.h?(q=d,n=4,(d=a.mobile||a.tablet?450<d.w&&d.w>d.h:1250<=d.w)?k(b,"a-ws"):b.className=v(b,"a-ws")):0<n&&(n--,x=setTimeout(l,16))}}function G(d){(m=d===B?!m:!!d)&&l()}function H(){return m}if(!u){u=!0;var r=function(){var d=["O","ms","Moz","Webkit"], c=e.createElement("div");return{testGradients:function(){return!0},test:function(a){var b=a.charAt(0).toUpperCase()+a.substr(1);a=(d.join(b+" ")+b+" "+a).split(" ");for(b=a.length;b--;)if(""===c.style[a[b]])return!0;return!1},testTransform3d:function(){return!1}}}(),y=b.className,z=/(^| )a-mobile( |$)/.test(y),A=/(^| )a-tablet( |$)/.test(y);a={audio:function(){return!!e.createElement("audio").canPlayType},video:function(){return!!e.createElement("video").canPlayType},canvas:function(){return!!e.createElement("canvas").getContext}, svg:function(){return!!e.createElementNS&&!!e.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect},offline:function(){return navigator.hasOwnProperty&&navigator.hasOwnProperty("onLine")&&navigator.onLine},dragDrop:function(){return"draggable"in e.createElement("span")},geolocation:function(){return!!navigator.geolocation},history:function(){return!(!c.history||!c.history.pushState)},webworker:function(){return!!c.Worker},autofocus:function(){return"autofocus"in e.createElement("input")}, inputPlaceholder:function(){return"placeholder"in e.createElement("input")},textareaPlaceholder:function(){return"placeholder"in e.createElement("textarea")},localStorage:function(){return"localStorage"in c&&null!==c.localStorage},orientation:function(){return"orientation"in c},touch:function(){return"ontouchend"in e},gradients:function(){return r.testGradients()},hires:function(){var a=c.devicePixelRatio&&1.5<=c.devicePixelRatio||c.matchMedia&&c.matchMedia("(min-resolution:144dpi)").matches;E("hiRes"+ (z?"Mobile":A?"Tablet":"Desktop"),a?1:0);return a},transform3d:function(){return r.testTransform3d()},touchScrolling:function(){return f(/Windowshop|android|OS ([5-9]|[1-9][0-9]+)(_[0-9]{1,2})+ like Mac OS X|SOFTWARE=([5-9]|[1-9][0-9]+)(.[0-9]{1,2})+.*DEVICE=iPhone|Chrome|Silk|Firefox|Trident.+?; Touch/i)},ios:function(){return f(/OS [1-9][0-9]*(_[0-9]*)+ like Mac OS X/i)&&!f(/trident|Edge/i)},android:function(){return f(/android.([1-9]|[L-Z])/i)&&!f(/trident|Edge/i)},mobile:function(){return z}, tablet:function(){return A},rtl:function(){return"rtl"===b.dir}};for(var g in a)a.hasOwnProperty(g)&&(a[g]=w(a[g]));for(var t="textShadow textStroke boxShadow borderRadius borderImage opacity transform transition".split(" "),p=0;p<t.length;p++)a[t[p]]=w(function(){return r.test(t[p])});var m=!0,x=0,q={w:0,h:0},n=4;l();h(c,"resize",function(){clearTimeout(x);n=4;l()});b.className=v(b,"a-no-js");k(b,"a-js");!f(/OS [1-8](_[0-9]*)+ like Mac OS X/i)||c.navigator.standalone||f(/safari/i)||k(b,"a-ember"); h=[];for(g in a)a.hasOwnProperty(g)&&a[g]&&h.push("a-"+g.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}));k(b,h.join(" "));b.setAttribute("data-aui-build-date",F);C.register("p-detect",function(){return{capabilities:a,localStorage:a.localStorage&&D,toggleResponsiveGrid:G,responsiveGridEnabled:H}});return a||{}}}}()})(window,document,Date);(function(g,l,C,D){function E(a){n&&n.tag&&n.tag(p(":","aui",a))}function m(a,b){n&&n.count&&n.count("aui:"+a,0===b?0:b||(n.count("aui:"+a)||0)+1)}function F(a){try{return a.test(navigator.userAgent)}catch(b){return!1}}function G(a){return"function"===typeof a}function u(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}function p(a,b,c,f){b=b&&c?b+a+c:b||c;return f?p(a,b,f):b}function y(a,b,c){try{Object.defineProperty(a,b,{value:c,writable:!1})}catch(f){a[b]= c}return c}function O(a,b){a.className=P(a,b)+" "+b}function P(a,b){return(" "+a.className+" ").split(" "+b+" ").join(" ").replace(/^ | $/g,"")}function ca(a,b,c){var f=c=a.length,e=function(){f--||(H.push(b),I||(q?q.set(z):setTimeout(z,0),I=!0))};for(e();c--;)Q[a[c]]?e():(v[a[c]]=v[a[c]]||[]).push(e)}function da(a,b,c,f,e){var d=l.createElement(a?"script":"link");u(d,"error",f);e&&u(d,"load",e);a?(d.type="text/javascript",d.async=!0,c&&/AUIClients|images[/]I/.test(b)&&d.setAttribute("crossorigin", "anonymous"),d.src=b):(d.rel="stylesheet",d.href=b);l.getElementsByTagName("head")[0].appendChild(d)}function R(a,b){return function(c,f){function e(){da(b,c,d,function(b){J?m("resource_unload"):d?(d=!1,m("resource_retry"),e()):(m("resource_error"),a.log("Asset failed to load: "+c));b&&b.stopPropagation?b.stopPropagation():g.event&&(g.event.cancelBubble=!0)},f)}if(S[c])return!1;S[c]=!0;m("resource_count");var d=!0;return!e()}}function ea(a,b,c){for(var f={name:a,guard:function(c){return b.guardFatal(a, c)},guardTime:function(a){return b.guardTime(a)},logError:function(c,d,e){b.logError(c,d,e,a)}},e=[],d=0;d<c.length;d++)A.hasOwnProperty(c[d])&&(e[d]=K.hasOwnProperty(c[d])?K[c[d]](A[c[d]],f):A[c[d]]);return e}function w(a,b,c,f,e){return function(d,k){function n(){var a=null;f?a=k:G(k)&&(q.start=r(),a=k.apply(g,ea(d,h,l)),q.end=r());if(b){A[d]=a;a=d;for(Q[a]=!0;(v[a]||[]).length;)v[a].shift()();delete v[a]}q.done=!0}var h=e||this;G(d)&&(k=d,d=D);b&&(d=d?d.replace(T,""):"__NONAME__",L.hasOwnProperty(d)&& h.error(p(", reregistered by ",p(" by ",d+" already registered",L[d]),h.attribution),d),L[d]=h.attribution);for(var l=[],m=0;m<a.length;m++)l[m]=a[m].replace(T,"");var q=x[d||"anon"+ ++fa]={depend:l,registered:r(),namespace:h.namespace};d&&ha.hasOwnProperty(d);c?n():ca(l,h.guardFatal(d,n),d);return{decorate:function(a){K[d]=h.guardFatal(d,a)}}}}function U(a){return function(){var b=Array.prototype.slice.call(arguments);return{execute:w(b,!1,a,!1,this),register:w(b,!0,a,!1,this)}}}function M(a,b){return function(c, f){f||(f=c,c=D);var e=this.attribution;return function(){h.push(b||{attribution:e,name:c,logLevel:a});var d=f.apply(this,arguments);h.pop();return d}}}function B(a,b){this.load={js:R(this,!0),css:R(this)};y(this,"namespace",b);y(this,"attribution",a)}function V(){l.body?k.trigger("a-bodyBegin"):setTimeout(V,20)}"use strict";var t=C.now=C.now||function(){return+new C},r=function(a){return a&&a.now?a.now.bind(a):t}(g.performance),ia=r(),ha={},n=g.ue;E();E("aui_build_date:3.24.1-2024-10-06");var W={getItem:function(a){try{return g.localStorage.getItem(a)}catch(b){}}, setItem:function(a,b){try{return g.localStorage.setItem(a,b)}catch(c){}}},q=g._pSetI(),H=[],ja=[],I=!1,ka=navigator.scheduling&&"function"===typeof navigator.scheduling.isInputPending;var z=function(){for(var a=q?q.set(z):setTimeout(z,0),b=t();ja.length||H.length;)if(H.shift()(),q&&ka){if(150<t()-b&&!navigator.scheduling.isInputPending()||50<t()-b&&navigator.scheduling.isInputPending())return}else if(50<t()-b)return;q?q.clear(a):clearTimeout(a);I=!1};var Q={},v={},S={},J=!1;u(g,"beforeunload",function(){J= !0;setTimeout(function(){J=!1},1E4)});var T=/^prv:/,L={},A={},K={},x={},fa=0,X=String.fromCharCode(92),h=[],Y=!0,Z=g.onerror;g.onerror=function(a,b,c,f,e){e&&"object"===typeof e||(e=Error(a,b,c),e.columnNumber=f,e.stack=b||c||f?p(X,e.message,"at "+p(":",b,c,f)):D);var d=h.pop()||{};e.attribution=p(":",e.attribution||d.attribution,d.name);e.logLevel=d.logLevel;e.attribution&&console&&console.log&&console.log([e.logLevel||"ERROR",a,"thrown by",e.attribution].join(" "));h=[];Z&&(d=[].slice.call(arguments), d[4]=e,Z.apply(g,d))};B.prototype={logError:function(a,b,c,f){b={message:b,logLevel:c||"ERROR",attribution:p(":",this.attribution,f)};if(g.ueLogError)return g.ueLogError(a||b,a?b:null),!0;console&&console.error&&(console.log(b),console.error(a));return!1},error:function(a,b,c,f){a=Error(p(":",f,a,c));a.attribution=p(":",this.attribution,b);throw a;},guardError:M(),guardFatal:M("FATAL"),guardCurrent:function(a){var b=h[h.length-1];return b?M(b.logLevel,b).call(this,a):a},guardTime:function(a){var b= h[h.length-1],c=b&&b.name;return c&&c in x?function(){var b=r(),e=a.apply(this,arguments);x[c].async=(x[c].async||0)+r()-b;return e}:a},log:function(a,b,c){return this.logError(null,a,b,c)},declare:w([],!0,!0,!0),register:w([],!0),execute:w([]),AUI_BUILD_DATE:"3.24.1-2024-10-06",when:U(),now:U(!0),trigger:function(a,b,c){var f=t();this.declare(a,{data:b,pageElapsedTime:f-(g.aPageStart||NaN),triggerTime:f});c&&c.instrument&&N.when("prv:a-logTrigger").execute(function(b){b(a)})},handleTriggers:function(){this.log("handleTriggers deprecated")}, attributeErrors:function(a){return new B(a)},_namespace:function(a,b){return new B(a,b)},setPriority:function(a){Y?Y=!1:this.log("setPriority only accept the first call.")}};var k=y(g,"AmazonUIPageJS",new B);var N=k._namespace("PageJS","AmazonUI");N.declare("prv:p-debug",x);k.declare("p-recorder-events",[]);k.declare("p-recorder-stop",function(){});y(g,"P",k);V();if(l.addEventListener){var aa;l.addEventListener("DOMContentLoaded",aa=function(){k.trigger("a-domready");l.removeEventListener("DOMContentLoaded", aa,!1)},!1)}var ba=l.documentElement,la=g._pd(k,F,u,O,ba,W,P,m,"3.24.1-2024-10-06");F(/UCBrowser/i)||la.localStorage&&O(ba,W.getItem("a-font-class"));k.declare("a-event-revised-handling",!1);g._sw(N,p,F,X,m,n,E,G,u,k);k.declare("a-fix-event-off",!1);m("pagejs:pkgExecTime",r()-ia)})(window,document,Date); (window.AmazonUIPageJS ? AmazonUIPageJS : P).load.js('https://images-na.ssl-images-amazon.com/images/I/61ZS63EQSsL._RC|11Y+5x+kkTL.js,51-UZWCmY3L.js,11yKORv-GTL.js,11na7Dl1tFL.js,21uGjv2MRDL.js,01VRMV3FBdL.js,21BJeD9yjcL.js,01cS+tLhj4L.js,11rRjDLdAVL.js,51UOrPXYGsL.js,11YA5PIFcPL.js,11UNP9ncXuL.js,11qGWmpSUoL.js,11EWRk6r74L.js,21paGe30x-L.js,01490L6yBnL.js,51Xt+PG12aL.js,01JYHc2oIlL.js,31nfKXylf6L.js,01ezj5Rkz1L.js,11bEz2VIYrL.js,31o2NGTXThL.js,01rpauTep4L.js,01RMmNcPMuL.js_.js?AUIClients/AmazonUI#trident'); (window.AmazonUIPageJS ? AmazonUIPageJS : P).load.js('https://images-na.ssl-images-amazon.com/images/I/616qGtYUw7L.js?AUIClients/DeXWebsiteAUIAssets'); </script> <div class="content-section"> <div class="docs"> <!-- jQuery (MIT license)--> <script src="https://amzndevresources.com/jekyll/js/jquery-3.6.0.min.js"></script> <!-- Bootstrap 4.4 css --> <link rel="stylesheet" href="https://amzndevresources.com/jekyll/css/bootstrap4.css"> <link rel="stylesheet" href="https://amzndevresources.com/jekyll/css/styleoverrides.css"> <link rel="stylesheet" href="https://amzndevresources.com/jekyll/css/popovers.css"> <!-- Navgoco --> <script src="https://amzndevresources.com/jekyll/js/jquery.navgoco.min.js"></script> <!-- jQuery cookie (MIT license)--> <script type="text/javascript" src="https://amzndevresources.com/jekyll/js/jquery.cookie.js"></script> <!-- Bootstrap (MIT license)--> <script src="https://amzndevresources.com/jekyll/js/bootstrap.4.4.1.bundle.min.js"></script> <!-- Anchor JS (MIT license)--> <script src="https://amzndevresources.com/jekyll/js/anchor.min.js"></script> <!-- Initialization scripts --> <script src="https://amzndevresources.com/jekyll/js/initialization_scripts.js"></script> <!-- Tech doc css fixes now incorporated into stylesheet --> <div class="container"> <!-- sidebar --> <div id="sidebar"> <!-- sidebar_hide_weblab --> <div class="mydocsidebar"> <div id="search-searchbar"></div> <script src="https://amzndevresources.com/alexa/jekyll/js/new-nav/CoveoJsSearch.min.js"></script> <link rel="stylesheet" href="https://amzndevresources.com/alexa/jekyll/js/new-nav/CoveoFullSearch.css"> <link rel="stylesheet" href="https://amzndevresources.com/jekyll/css/search.css"> <script> if (!window.newSearch) { document.addEventListener("DOMContentLoaded", function () { const searchBoxRoot = document.getElementById("searchbox"); const organizationId = "amazoncomproduction9q1by2xb"; const accessToken = "xx42d66989-6d5b-4bd4-bc36-d3b3a04aa40f"; Coveo.SearchEndpoint.configureCloudV2Endpoint(organizationId, accessToken); Coveo.initSearchbox(searchBoxRoot, "https://developer.amazon.com/docs/appstore/search.html"); }); } </script> <div id="searchbox" class="CoveoSearchInterface" data-enable-history="true" data-results-per-page="80" data-excerpt-length="120" data-enable-duplicate-filtering="true" data-pipeline="AppstoreTechDocs" style="display:none"> <script> document.addEventListener("DOMContentLoaded", function () { let root = document.querySelector("#searchbox"); // event handler to group results by “source” Coveo.$$(root).on("preprocessResults", function (e, args) { // Split the "title suffix" to be the "category" because we don't have anything else in yet in the index. let results = args.results.results.map((r) => { const title = r.title; if (title.includes("|")) { // set the category r.raw.category = title.split("|")[1].trim(); r.title = title.split("|")[0].trim(); } else { r.raw.category = "YouTube"; } return r; }); // sort results per category results = results.sort((a, b) => { return a.raw.category.localeCompare(b.raw.category); }); // Set a category Label for the first results of the category. // Keep only 3 items per category. let lastCategory = ""; let categoryCount = 0; results.forEach((r, idx) => { if (lastCategory !== r.raw.category) { lastCategory = r.raw.category; categoryCount = 0; r.raw.categoryLabel = r.raw.category; } categoryCount++; if (categoryCount > 3) { // we already have 3 items for this category r.toDelete = true; } }); // clear out the results marked for deletion results = results.filter((r) => !r.toDelete); args.results.results = results; }); }); $(document).ready(function () { $(".inline").click(function () { $(".coveo-show-if-no-results").hide(); }); }); document.addEventListener("DOMContentLoaded", function () { $("#searchbox .magic-box input").attr("placeholder", "Search Appstore Docs (BETA)"); }); </script> <div class="CoveoAnalytics" data-anonymous="true" data-search-hub="appstore-dropdown-search"></div> <div class="coveo-search-section"> <div class="CoveoSearchbox" data-enable-omnibox="true" data-enable-query-syntax="true" data-search-as-you-type-delay="300"> <div class="CoveoOmniboxResultList" data-layout="list"> <div class="coveo-show-if-results"> <script class="result-template" type="text/x-underscore"> <div> <% if (raw.categoryLabel ) { %> <div class="category-label CoveoFieldValue" data-field="@categoryLabel"></div> <% } %> <div class="co-highlight"> <div> <a class='CoveoResultLink'></a> </div> <div class='CoveoExcerpt'></div> <div class="CoveoFieldValue CoveoCrumb" data-field="@crumb"></div> </div> </div> </script> </div> <div class="coveo-show-if-no-results"> <p>No results found</p> <div class="co-empty">Try a different or more specific query.</div> </div> </div> </div> </div> </div> <script> document.addEventListener("DOMContentLoaded", function () { var searchInterface = document.querySelector("#searchbox"); Coveo.$$(searchInterface).on("populateOmnibox", function (e, populateOmniboxObject) { var linkElement = document.createElement("a"); var query = populateOmniboxObject.completeQueryExpression.word; if (!query) { return; } linkElement.href = "https://developer.amazon.com/docs/appstore/search.html#q=" + encodeURIComponent(query); linkElement.text = 'See more results for "' + query + '"'; linkElement.className = "coveo-omnibox-selectable co-more-results"; linkElement["no-text-suggestion"] = true; linkElement.addEventListener("keyboardSelect", function () { linkElement.click(); }); populateOmniboxObject.rows.push({ element: linkElement, zIndex: 0 }); }); }); </script> <div class="productTitle">Amazon Device Messaging</div> <p class="external"> <a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a> </p> <ul id="docnavsidebar" class="docnav"> <li class="level1 folderTitle"> <a class="subfoldersTitle" href="#">Amazon Device Messaging</a> <ul> <li class="level1items"><a href="../adm/overview.html">Overview</a></li> <li class="level1items"><a href="../adm/release-notes.html">Release Notes</a></li> <li class="level1items open"><a href="../adm/message-types.html">ADM Message Types</a></li> <li class="level1items"><a href="../adm/obtain-credentials.html">Obtain Credentials</a></li> <li class="level1items"><a href="../adm/set-up.html">Set Up Amazon Device Messaging</a></li> <li class="level1items"><a href="../adm/integrate-your-app.html">Integrate Your App</a></li> <li class="level1items"><a href="../adm/request-access-token.html">Request an Access Token</a></li> <li class="level1items"><a href="../adm/send-message.html">Send a Message</a></li> <li class="level1items"><a href="../adm/topic-based-messaging.html">Topic Based Messaging</a></li> <li class="level1items"><a href="../adm/group-based-messaging.html">Group Based Messaging</a></li> <li class="level1items"><a href="../adm/faq-adm.html">FAQ</a></li> </ul> </li><li class="level1 folderTitle"> <a class="subfoldersTitle" href="#">Migrate from FCM</a> <ul> <li class="level1items"><a href="../app-porting/device-messaging.html">Migration Overview</a></li> <li class="level1items"><a href="../app-porting/device-messaging-explore.html">Step 1: Explore</a></li> <li class="level1items"><a href="../app-porting/device-messaging-choose.html">Step 2: Choose</a></li> <li class="level2 folderTitle"> <a class="subfoldersTitle" href="#">Step 3: Fit</a> <ul> <li class="level2items"><a href="../app-porting/device-messaging-fit-update-manifest.html">Update Your App Manifest</a></li> <li class="level2items"><a href="../app-porting/device-messaging-fit-obtain-api-key.html">Obtain and Store Your API Key</a></li> <li class="level2items"><a href="../app-porting/device-messaging-fit-implement.html">Registration and Message Handling</a></li> </ul> </li> <li class="level1items"><a href="../app-porting/device-messaging-verify-push.html">Verify and Push</a></li> </ul> </li> </ul> <hr class="resourceSeparator"> <div class="relatedResources">Other Resources</div> <ul id="entrypages"> <li><a href="https://amzndevresources.com/adm/sdk/AmazonDeviceMessaging.zip">Download the ADM SDK</a></li> <li><a href="https://amzndevresources.com/adm/API-Reference/API-Reference/index.html">ADM API Reference</a></li> <li><a href="../a3l-messaging/understanding-a3l-messaging.html">Understanding A3L Messaging</a></li> <li><a href="https://community.amazondeveloper.com/tag/appstore-adm">Device Messaging Forum</a></li> <li><a href="https://developer.amazon.com/documentation">Documentation Index</a></li> <li><a href="https://developer.amazon.com/blogs/">Appstore Blog</a></li> <li><a href="https://developer.amazon.com/docs/apps-and-games/sdk-downloads.html">SDK Downloads</a></li> </ul> </div> <script> $("li.open").parents('li').toggleClass("open"); </script> </div> <!-- main area --> <div class="mainColumn"> <div id="content"> <h1>ADM Message Types</h1> <p>Amazon Device Messaging (ADM) offers push notifications (messages) that you can use to display messages about your app on a user's device. Make sure you have <a href="../adm/integrate-your-app.html">integrated your app with ADM</a> before you get started with ADM messages.</p> <ul id="markdown-toc"> <li><a href="#message-types" id="markdown-toc-message-types">Message types</a></li> <li><a href="#test-adm" id="markdown-toc-test-adm">Data message</a></li> <li><a href="#notification" id="markdown-toc-notification">Notification message</a></li> <li><a href="#data-note" id="markdown-toc-data-note">Data and Notification message</a></li> <li><a href="#message-behavior" id="markdown-toc-message-behavior">Message behavior</a></li> <li><a href="#message-priority" id="markdown-toc-message-priority">Message priority</a></li> <li><a href="#test-adm-integration" id="markdown-toc-test-adm-integration">Test ADM integration</a></li> </ul> <h2 id="message-types">Message types</h2> <p>In ADM, a message is a communication between a developer app and a developer server. ADM offers three types of messages, described in the table below.</p> <table> <colgroup> <col width="25%"> <col width="25%"> <col width="50%"> </colgroup> <thead> <tr> <th>ADM Message Type</th> <th>Description</th> <th>Example Use Cases</th> </tr> </thead> <tbody> <tr> <td>Data message</td> <td>Messages handled by your app and defined by custom key-value pairs.</td> <td>Use a data message when you want to use custom logic to process a message. For example, you can use data messages to send messages to your app's background tasks.</td> </tr> <tr> <td>Notification message</td> <td>Messages handled by the ADM SDK and defined by preset key-value pairs.</td> <td>Use notification messages for a message that is automatically displayed to users, such as promotional offers or marketing notifications.</td> </tr> <tr> <td>Data and notification message</td> <td>A notification message that also contains a data message payload of custom key-value pairs.</td> <td>Use data and notification messages when you want to automatically display a message that a user can take action on. For example, you can send an message that an item in a user's cart has a promotional offer. When the user engages with the message, they are sent to a page requiring a promotional code. The message about the offer is a notification message, while the second page requiring a promotional code is a data message with custom logic.</td> </tr> </tbody> </table> <p>See the sections below for details on each message type.</p> <h2 id="test-adm">Data message</h2> <p>A data message is an ADM message that you create with custom logic and pass to devices using ADM. You need to configure the logic for these notifications in your app. Here's an example of message payload for a <code>data</code> message:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="s2">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"key1"</span><span class="p">:</span><span class="s2">"value1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"key2"</span><span class="p">:</span><span class="s2">"value2"</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="s2">"consolidationKey"</span><span class="p">:</span><span class="s2">"Some Key"</span><span class="p">,</span><span class="w"> </span><span class="s2">"expiresAfter"</span><span class="p">:</span><span class="mi">86400</span><span class="w"> </span><span class="p">}</span><span class="w"> </span></code></pre></div></div> <p>See <a href="../adm/send-message.html">Send a Message</a> for more details.</p> <h2 id="notification">Notification message</h2> <div class="alert alert-warning" role="alert"><i class="fa fa-warning"></i> <b>Important:</b> Notification messages are available for Fire tablets running the latest version of Fire OS 7 and Fire TVs running latest version of Fire OS versions 5-7.</div> <p>ADM notifications are messages that ADM sends to user devices. The ADM SDK handles the messages and sends notifications on your behalf.</p> <p>To programmatically send notification messages, set the <code>notification</code> key and add the key-value pair of the user-visible message. For example, you can set a notification message such as <em>We have a new offer for you!</em> like this:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="s2">"notification"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"title"</span><span class="p">:</span><span class="s2">"ADM Message Notification"</span><span class="p">,</span><span class="w"> </span><span class="s2">"body"</span><span class="p">:</span><span class="s2">"We have a new offer for you!"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="s2">"expiresAfter"</span><span class="p">:</span><span class="mi">86400</span><span class="w"> </span><span class="p">}</span><span class="w"> </span></code></pre></div></div> <p>Notification messages require the use of pre-defined key-value pairs. The table below lists the key-value pairs supported by ADM notifications.</p> <table> <colgroup> <col width="25%"> <col width="25%"> <col width="50%"> </colgroup> <thead> <tr> <th>Field</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>title</code></td> <td><code>string</code></td> <td>The notification's title.</td> </tr> <tr> <td><code>body</code></td> <td><code>string</code></td> <td>The notification's body text.</td> </tr> <tr> <td><code>icon</code></td> <td><code>string</code></td> <td>The notification's icon. Sets the notification icon to myicon for drawable resource myicon. If you don't send this key in the request, displays the launcher icon specified in your app manifest.</td> </tr> <tr> <td><code>color</code></td> <td><code>string</code></td> <td>The notification's icon color, expressed in #rrggbb format.</td> </tr> <tr> <td><code>sound</code></td> <td><code>string</code></td> <td>The sound to play when the device receives the notification. Supports "default" or the filename of a sound resource bundled in the app. Sound files must reside in /res/raw/.</td> </tr> <tr> <td><code>tag</code></td> <td><code>string</code></td> <td>Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer.</td> </tr> <tr> <td><code>click_action</code></td> <td><code>string</code></td> <td>The action associated with a user click on the notification. If specified, an activity with a matching intent filter is launched when a user clicks on the notification.</td> </tr> <tr> <td><code>body_loc_key</code></td> <td><code>string</code></td> <td>The key to the body string in the app's string resources to use to localize the body text to the user's current localization.</td> </tr> <tr> <td><code>body_loc_args[]</code></td> <td><code>string</code></td> <td>Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization.</td> </tr> <tr> <td><code>title_loc_key</code></td> <td><code>string</code></td> <td>The key to the title string in the app's string resources to use to localize the title text to the user's current localization.</td> </tr> <tr> <td><code>title_loc_args[]</code></td> <td><code>string</code></td> <td>Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization.</td> </tr> <tr> <td><code>channel_id</code></td> <td><code>string</code></td> <td>The notification's channel id (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.</td> </tr> <tr> <td><code>ticker</code></td> <td><code>string</code></td> <td>Sets the "ticker" text, which is sent to accessibility services. Prior to API level 21 (Lollipop), sets the text that is displayed in the status bar when the notification first arrives.</td> </tr> <tr> <td><code>sticky</code></td> <td><code>boolean</code></td> <td>When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it.</td> </tr> <tr> <td><code>event_time</code></td> <td><code>string (Timestamp format)</code></td> <td>Set the time that the event in the notification occurred. Notifications in the panel are sorted by this time. A point in time is represented using protobuf.Timestamp. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".</td> </tr> <tr> <td><code>local_only</code></td> <td><code>boolean</code></td> <td>Set whether or not this notification is relevant only to the current device. Some notifications can be bridged to other devices for remote display, such as a Wear OS watch. This hint can be set to recommend this notification not be bridged.</td> </tr> <tr> <td><code>notification_priority</code></td> <td><code>enum (NotificationPriority)</code></td> <td>Set the relative priority for this notification. Priority is an indication of how much of the user's attention should be consumed by this notification. Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification. The effect of setting the same priorities may differ slightly on different platforms. Note this priority differs from AndroidMessagePriority. This priority is processed by the client after the message has been delivered, whereas AndroidMessagePriority is an FCM concept that controls when the message is delivered.</td> </tr> <tr> <td><code>default_sound</code></td> <td><code>boolean</code></td> <td>If set to true, use the Android framework's default sound for the notification. Default values are specified in config.xml.</td> </tr> <tr> <td><code>visibility</code></td> <td><code>enum (Visibility)</code></td> <td>Set the Notification.visibility of the notification.</td> </tr> <tr> <td><code>notification_count</code></td> <td><code>integer</code></td> <td>Sets the number of items this notification represents. May be displayed as a badge count for launchers that support badging. For example, this might be useful if you're using just one notification to represent multiple new messages but you want the count here to represent the number of total new messages. If zero or unspecified, systems that support badging use the default, which is to increment a number displayed on the long-press menu each time a new notification arrives.</td> </tr> <tr> <td><code>image</code></td> <td><code>string</code></td> <td>Contains the URL of an image that is going to be displayed in a notification. If present, it will override google.firebase.fcm.v1.Notification.image.</td> </tr> </tbody> </table> <p>See <a href="../adm/send-message.html">Send a Message</a> for more details on defining message payloads.</p> <h2 id="data-note">Data and Notification message</h2> <div class="alert alert-warning" role="alert"><i class="fa fa-warning"></i> <b>Important:</b> Notification messages are available for Fire tablets running the latest version of Fire OS 7 and Fire TVs running latest version of Fire OS versions 5-7.</div> <p>You can also send notification messages that contain key-value pairs from data messages by configuring the <code>notification</code> and <code>data</code> payloads. In this scenario, the ADM SDK handles the notification message, while the data message payload is handled by your app.</p> <p>Here's an example of message payload with notification and data messages:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="s2">"data"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"key1"</span><span class="p">:</span><span class="s2">"value1"</span><span class="p">,</span><span class="w"> </span><span class="s2">"key2"</span><span class="p">:</span><span class="s2">"value2"</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="s2">"notification"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"title"</span><span class="p">:</span><span class="s2">"ADM Message Notification"</span><span class="p">,</span><span class="w"> </span><span class="s2">"body"</span><span class="p">:</span><span class="s2">"We have a new offer for you!"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="s2">"expiresAfter"</span><span class="p">:</span><span class="mi">86400</span><span class="w"> </span><span class="p">}</span><span class="w"> </span></code></pre></div></div> <h2 id="message-behavior">Message behavior</h2> <p>The ADM SDK handles your messages with the <code>onMessage</code> method. The behavior of ADM messages on a device depends on the state of your app (whether the app is in the background or foreground).</p> <p>Foreground apps receive message payloads for both data and notification messages when they are received by the device. Background apps receive notification payloads in a system tray and deliver the message when a user taps the notification.</p> <p>The table below describes the behavior of messages based on the state of the app.</p> <table> <thead> <tr> <th>App state</th> <th>Notification message</th> <th>Data message</th> <th>Data and notification message</th> </tr> </thead> <tbody> <tr> <td>Foreground</td> <td><code>onMessage</code></td> <td><code>onMessage</code></td> <td><code>onMessage</code></td> </tr> <tr> <td>Background</td> <td>System tray</td> <td><code>onMessage</code></td> <td>Notification message: system tray<br>Data message: in the extras of the intent</td> </tr> </tbody> </table> <h2 id="message-priority">Message priority</h2> <p>For both data and notification messages, there are two priority states: normal and high. Normal is the default priority for both message types.</p> <p><em>Normal priority messages</em> are delivered to users immediately when the app is in the foreground. When the device is in doze mode, the delivery of normal messages is delayed until the app is in the foreground.</p> <p>For <em>high priority messages</em>, ADM attempts to deliver the message immediately, regardless of the state of the user's device. The number of high priority messages an app can receive in a day is limited by the app's standby bucket.</p> <p>You can set the message priority with the <code>priority</code> parameter. Here's an example of a request for a high priority message:</p> <div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="s2">"data"</span><span class="p">:{</span><span class="s2">"key1"</span><span class="p">:</span><span class="s2">"value1"</span><span class="p">,</span><span class="s2">"key2"</span><span class="p">:</span><span class="s2">"value2"</span><span class="p">},</span><span class="w"> </span><span class="s2">"priority"</span><span class="p">:</span><span class="s2">"high"</span><span class="w"> </span><span class="s2">"expiresAfter"</span><span class="p">:</span><span class="mi">86400</span><span class="w"> </span><span class="p">}</span><span class="w"> </span></code></pre></div></div> <p>See <a href="../adm/send-message.html#request-format">Send a Message</a> for more details.</p> <h2 id="test-adm-integration">Test ADM integration</h2> <p>You can confirm that your app is set up with ADM by sending a test notification to a device. See <a href="../adm/send-message.html#test-adm-console">Send a Message</a> for more information.</p> <hr> <p id="tech-docs-updated-date"><small><i>Last updated: Jun 08, 2022</i></small></p> </div> </div> </div><!--/.container--> </div><!--/.page-container--> <style> .dpFooter .dpfNav { min-height: 220px; } </style> <link rel="stylesheet" href="https://amzndevresources.com/jekyll/css/search-fullpage.css"> <link rel="stylesheet" href="https://amzndevresources.com/jekyll/js/unload.js"> </div> <section class="dp-content-slot dp-content-pixel-tracker-slot"> <div class="dp-content-slot-inner container"> </div> </section> <footer class='dpFooter'> <a class='dpfBackToTopLink' href='#'>Back to top</a> <nav class="dpfNav accordion clearfix"> <div class='dpfWidth'> <div class='dpfnHideRightMargin'> <div class='dpfnColWrap'> <div class="dpfnCol"> <div class="dpfnGroup accrItem"> <div class='dpIconArrow accrHandle'></div> <h3>Resources</h3> <ul> <li><a href="/apps-and-games/blogs">Appstore Developer Blog</a></li> <li><a href="/apps-and-games/documentation">Technical Documentation</a></li> <li><a href="/apps-and-games/devhuddle">Amazon Developer Huddle</a></li> </ul> </div> </div> <div class="dpfnCol"> <div class="dpfnGroup accrItem"> <div class='dpIconArrow accrHandle'></div> <h3>Supported devices</h3> <ul> <li><a href="/apps-and-games/fire-tv">Amazon Fire TV</a></li> <li><a href="/apps-and-games/fire-tablets">Fire tablets</a></li> </ul> </div> </div> </div> <div class='dpfnColWrap'> <div class="dpfnCol"> <div class="dpfnGroup accrItem"> <div class='dpIconArrow accrHandle'></div> <h3>Other services & APIs</h3> <ul> <li><a href="/apps-and-games/small-business-program">Small Business Accelerator Program</a></li> <li><a href="/docs/reports-promo/promo-overview.html ">Developer Promotions Console</a></li> <li><a href="/apps-and-games/alexa-for-video-publishers">Alexa for video publishers</a></li> <li><a href="/apps-and-games/login-with-amazon">Login with Amazon</a></li> <li><a href="/docs/amazon-data-portability/overview.html">Amazon Data Portability</a></li> <li><a href="/frustration-free-setup">Frustration-Free Setup</a></li> <li><a href="/incentives-api">Amazon Incentives API</a></li> <li><a href="/apps-and-games/merch">Amazon Merch on Demand</a></li> <li><a href="/docs/music/landing_home.html">Amazon Music</a></li> </ul> </div> </div> <div class="dpfnCol"> <div class="dpfnGroup accrItem"> <div class='dpIconArrow accrHandle'></div> <h3>Support</h3> <ul> <li><a href="https://community.amazondeveloper.com/">Appstore Developer Community</a></li> <li><a href="/docs/app-submission/faq-landing.html">FAQs</a></li> <li><a href="/support/contact-us">Contact Us</a></li> </ul> </div> <div class="dpfnGroup accrItem"> <div class='dpIconArrow accrHandle'></div> <h3>Legal</h3> <ul> <li><a href="/terms-and-agreements">Terms & Agreements</a></li> <li><a href="https://www.amazon.com/gp/help/customer/display.html?nodeId=GX7NJQ4ZB8MHFRNJ">Privacy Notice</a></li> </ul> </div> </div> </div> </div> </div> </nav> <div class="dpfSocialLocal clearfix"> <div class='dpfWidth'> <div class='dpfLocale'> <nav class="dpLangSwitcher dpsfFlyout"> <span class='dplsTitle'>Language</span> <div class='dplsSwitch'> <span class="dplsCurrent dpsfFlyoutCurrent"> <i class='dpsfIcon dpsfIconGlobe'></i> English </span> <div class='dplsOptionsWrap dpsfFlyoutWrap'> <ul class="dplsOptions dpsfFlyoutContent"> <li class="dplsOption dpsfFlyoutItem dplsOptionActive"> <a data-locale="en_US" href="/docs/adm/message-types.html"> English </a> </li> <li class="dplsOption dpsfFlyoutItem "> <a data-locale="zh_CN" href="/zh/docs/adm/message-types.html"> Chinese (中文) </a> </li> <li class="dplsOption dpsfFlyoutItem "> <a data-locale="ja_JP" href="/ja/docs/adm/message-types.html"> Japanese (日本語) </a> </li> </ul> </div> </div> </nav> </div> <div class="dpfSocial"> <span class="dpfSocialTitle"> Follow Us: </span> <a href="https://www.youtube.com/channel/UCT9ApARFgQJOeqD-ygmxnJQ"> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/logo-youtube.png" alt="youtube_icon"/> </a> <a href="https://www.linkedin.com/showcase/amazon-appstore-developers"> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/logo_linkedin._CB1704305834_.png" alt="linkedin_icon"/> </a> <a href="https://www.twitter.com/AmazonAppDev"> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/logo_X.png" alt="X_icon"/> </a> <a href="https://www.facebook.com/AmazonAppDev"> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/logo_facebook02.png" alt="facebook_icon"/> </a> <a href="/apps-and-games/blog"> <img src="https://images-na.ssl-images-amazon.com/images/G/01/mobile-apps/dex/logo-blog._V290989945_.png" alt="blog_icon"/> </a> </div> </div> </div> <div class="dpfAreaOfInterest dpsfFlyout"> <span class='dpfaCurrent'> <i class='dpsfIcon dpsfIconDots'></i> </span> <div class="dpfWidth dpsfFlyoutWrap"> <div class="dpfaItems dpsfFlyoutContent"> <h3><hza:string id="area_of_interest_title" /></h3> <div class="dpfaItem dpsfFlyoutItem"> <a href="/alexa"> <span class='dpfaiText'>Alexa</span> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/platform-logos/white/Alexalogoheaderwhite._V506548913_.png" alt="Alexa" /> </a> </div> <div class="dpfaItem dpsfFlyoutItem"> <a href="/apps-and-games"> <span class='dpfaiText'>Amazon Appstore</span> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/platform-logos/white/Appstorelogowhite.png" alt="Amazon Appstore" /> </a> </div> <div class="dpfaItem dpsfFlyoutItem"> <a href="https://aws.amazon.com"> <span class='dpfaiText'>Amazon Web Services</span> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/platform-logos/white/AWS_logo_RGB_WHT._CB1506540482_.png" alt="Amazon Web Services" /> </a> </div> </div> </div> </div> <div class="dpfCopyright"> © 2010-2024, Amazon.com, Inc. or its affiliates. All Rights Reserved. </div> </footer> </div></body> <!-- Google Tag Manager (noscript) --> <noscript><iframe sandbox src="https://www.googletagmanager.com/ns.html?id=GTM-5LVXJD4" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> </html>

Pages: 1 2 3 4 5 6 7 8 9 10