{
    "componentChunkName": "component---src-templates-doc-article-js",
    "path": "/sdk/v5/react-native/in-app-messages/",
    "result": {"data":{"site":{"siteMetadata":{"title":"Notificare Docs"}},"mdx":{"id":"ecf57275-7263-506d-94a2-894cfb662118","body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"In-app Messages | React Native | SDK\",\n  \"lang\": \"en\",\n  \"description\": \"...\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h1\", null, \"In-App Messages\"), mdx(\"p\", null, \"In-app messaging allows you to communicate with users directly within your application, delivering contextual and timely messages that enhance engagement.\\nThis feature enables a new level of personalization by allowing you to display messages, promotions, or tips based on user behavior or interaction patterns.\"), mdx(\"p\", null, \"Integrating in-app messages helps create a continuous communication channel with your users \\u2014 ensuring that relevant content is displayed exactly when it matters most.\"), mdx(\"p\", null, \"To enable this functionality, include the \", mdx(\"code\", {\n    parentName: \"p\",\n    \"className\": \"language-text\"\n  }, \"react-native-actito-in-app-messaging\"), \" module in your project's \", mdx(\"code\", {\n    parentName: \"p\",\n    \"className\": \"language-text\"\n  }, \"package.json\"), \".\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"json\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"style\": {\n      \"counterReset\": \"linenumber NaN\"\n    },\n    \"className\": \"language-json line-numbers\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-json\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token property\"\n  }, \"\\\"dependencies\\\"\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token operator\"\n  }, \":\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"{\"), \"\\n    \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token property\"\n  }, \"\\\"react-native-actito-in-app-messaging\\\"\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token operator\"\n  }, \":\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token string\"\n  }, \"\\\"^5.0.0\\\"\"), \"\\n  \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\"), \"\\n\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"}\")), mdx(\"span\", {\n    parentName: \"pre\",\n    \"aria-hidden\": \"true\",\n    \"className\": \"line-numbers-rows\",\n    \"style\": {\n      \"whiteSpace\": \"normal\",\n      \"width\": \"auto\",\n      \"left\": \"0\"\n    }\n  }, mdx(\"span\", {\n    parentName: \"span\"\n  }), mdx(\"span\", {\n    parentName: \"span\"\n  }), mdx(\"span\", {\n    parentName: \"span\"\n  }), mdx(\"span\", {\n    parentName: \"span\"\n  }), mdx(\"span\", {\n    parentName: \"span\"\n  })))), mdx(\"p\", null, \"The in-app messaging module is a zero-configuration library, meaning no additional setup or initialization code is required.\\nSimply including the dependency automatically enables the feature within your project.\"), mdx(\"h2\", null, \"Suppressing Messages\"), mdx(\"p\", null, \"In certain scenarios \\u2014 such as during a checkout or onboarding flow \\u2014 you may want to temporarily prevent in-app messages from appearing to avoid disrupting the user experience.\"), mdx(\"p\", null, \"You can suppress in-app messages by setting the \", mdx(\"code\", {\n    parentName: \"p\",\n    \"className\": \"language-text\"\n  }, \"hasMessagesSuppressed\"), \" flag:\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"javascript\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"style\": {\n      \"counterReset\": \"linenumber NaN\"\n    },\n    \"className\": \"language-javascript line-numbers\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token keyword\"\n  }, \"await\"), \" ActitoInAppMessaging\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \".\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token function\"\n  }, \"setMessagesSuppressed\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"(\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token boolean\"\n  }, \"true\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \")\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \";\")), mdx(\"span\", {\n    parentName: \"pre\",\n    \"aria-hidden\": \"true\",\n    \"className\": \"line-numbers-rows\",\n    \"style\": {\n      \"whiteSpace\": \"normal\",\n      \"width\": \"auto\",\n      \"left\": \"0\"\n    }\n  }, mdx(\"span\", {\n    parentName: \"span\"\n  })))), mdx(\"p\", null, \"It is important to reset the flag once the high-priority flow is complete.\\nIf not reset, messages will remain suppressed until the application is restarted.\"), mdx(\"h3\", null, \"Re-Evaluating Message Context\"), mdx(\"p\", null, \"By default, the SDK does not automatically re-evaluate the app\\u2019s foreground context when you stop suppressing messages.\\nIf you want the SDK to immediately re-evaluate and display any in-app messages after suppression ends, call the following method instead:\"), mdx(\"div\", {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"javascript\"\n  }, mdx(\"pre\", {\n    parentName: \"div\",\n    \"style\": {\n      \"counterReset\": \"linenumber NaN\"\n    },\n    \"className\": \"language-javascript line-numbers\"\n  }, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token keyword\"\n  }, \"await\"), \" ActitoInAppMessaging\", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \".\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token function\"\n  }, \"setMessagesSuppressed\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \"(\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token boolean\"\n  }, \"false\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \",\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token comment\"\n  }, \"/* evaluateContext */\"), \" \", mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token boolean\"\n  }, \"true\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \")\"), mdx(\"span\", {\n    parentName: \"code\",\n    \"className\": \"token punctuation\"\n  }, \";\")), mdx(\"span\", {\n    parentName: \"pre\",\n    \"aria-hidden\": \"true\",\n    \"className\": \"line-numbers-rows\",\n    \"style\": {\n      \"whiteSpace\": \"normal\",\n      \"width\": \"auto\",\n      \"left\": \"0\"\n    }\n  }, mdx(\"span\", {\n    parentName: \"span\"\n  })))), mdx(\"p\", null, \"This ensures that relevant messages are displayed promptly once the user exits the restricted flow.\"));\n}\n;\nMDXContent.isMDXComponent = true;","frontmatter":{"title":"In-app Messages | React Native | SDK","description":"..."}}},"pageContext":{"slug":"/sdk/v5/react-native/in-app-messages/","previous":{"fields":{"slug":"/sdk/v5/react-native/in-app-messages/customizations/android/"},"frontmatter":{"title":"Android Customizations | In-App Messaging | React Native | SDK","description":"..."}},"next":{"fields":{"slug":"/sdk/v5/react-native/loyalty/advanced/manual-integration/"},"frontmatter":{"title":"Manual Integration| Advanced | Loyalty | React Native | SDK","description":"..."}},"language":"en","intl":{"language":"en","languages":["en"],"messages":{"title":"Notificare Docs","description":"Find the newest resources, guides and code. Make the most out of your app using our SDK and APIs.","author":"@notificare","pages.404.title":"These aren't the droids you're looking for","pages.404.description":"Probably the page you are looking for does not exist or was recently moved. If you think something is wrong please contact us.","pages.home.title":"Help Center","pages.home.description":"Find the newest resources, guides and code. Make the most out of your app using our SDK and APIs.","components.cookieManager.title":"Cookie Settings","components.cookieManager.text":"This website uses the following types of cookies; strictly necessary, performance, functional and marketing cookies. For specific information regarding how these cookies may impact your experience please read our <a href='/cookies'>Cookie Policy</a> and <a href='/privacy'>Privacy Policy</a>.","components.cookieManager.types.strict.label":"Strict","components.cookieManager.types.functional.label":"Functional","components.cookieManager.types.performance.label":"Performance","components.cookieManager.types.marketing.label":"Marketing","components.cookieManager.button":"Save Settings","components.search.query.placeholder":"Type your search","components.search.query.button":"Search","components.search.query.error":"Please insert some search terms","components.search.query.noResults":"No results found for your search terms","components.footer.copyright":"Notificare","components.footer.platform":"Platform Status","components.notificare.onBoarding.text":"Would you like to receive push notifications from our website?","components.notificare.onBoarding.cancelText":"No","components.notificare.onBoarding.acceptText":"Yes","shared.readMore":"Read more","shared.latestVersion":"Latest Version:","shared.jumpTo":"Jump to:","shared.sdkWarning":"These are deprecated or outdated SDK guides. Make sure you use the latest version of our libraries in order to benefit from all the new features, important bug fixes and security updates.","shared.guidesWarning":"You are viewing guides to a legacy interface that will be discontinued on January 1 2024. Please consider switching to the new interface.","shared.comingSoon":"Coming Soon"},"routed":false,"originalPath":"/sdk/v5/react-native/in-app-messages/","redirect":false,"redirectDefaultLanguageToRoot":false,"defaultLanguage":"en","fallbackLanguage":"","ignoredPaths":[]}}},
    "staticQueryHashes": ["1473005414","63159454"]}