For most data types, the most possible frequency of updates is 1 hour.
iOS can update data more frequently for some data types, for example, vo2 max.
iOS may throttle the frequency of updates for background delivery depending on the app’s activity, battery state, etc.
Background delivery is not possible while a device is locked, so it will be executed only when the device is unlocked.
iOS may stop background delivery if it detects that the app is not active for a long time.
The feature is available starting with iOS 15.
Important: The Spike SDK, along with any other HealthKit applications, cannot guarantee data synchronization on a fixed schedule. The hourly sync
interval serves as a guideline rather than a strict requirement enforced by iOS. Consequently, the actual synchronization frequency may vary,
occurring hourly, once per day, or during specific system-defined events, such as the conclusion of Sleep Mode or when the device begins charging.
Important Notes About Background Delivery on Android
Background delivery is scheduled to run every hour, but ultimately, Android decides when the delivery will be executed.
Android may throttle the frequency of updates for background delivery depending on the app’s activity, battery state, etc.
Android may stop background delivery if it detects that the app is not active for a long time.
There is a limit of queries that can be done in Health Connect, and it is different for foreground and background reads, so please request only essential data to be delivered in the background. More information in Health Connect documentation.
Important: The Spike SDK, along with any other applications, cannot guarantee data synchronization on a fixed schedule. The hourly sync interval serves as a guideline rather than a strict requirement enforced by Android. Consequently, the actual synchronization frequency may vary, occurring hourly, once per day, or during specific system-defined events, such as the conclusion of Sleep Mode or when the device begins charging.
Keep in mind that calling enableBackgroundDelivery() will overwrite previous configuration. So you have to call it with all the data types you want in one call.To check current configuration call getBackgroundDeliveryConfig() method.To stop background delivery call disableBackgroundDelivery() method.
If Samsung Health Data is enabled before enabling background delivery, enableBackgroundDelivery will automatically enable Samsung Health Data background delivery.
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"Spike API","colors":{"primary":"#0E2240","light":"#457CB1","dark":"#0E2240"},"logo":{"light":"https://mintcdn.com/trial-7e3c8695/C_wqhbtsn7F05yl4/images/logo.svg?fit=max\u0026auto=format\u0026n=C_wqhbtsn7F05yl4\u0026q=85\u0026s=435095cb4c721a082a83f3ad17fa156c","dark":"https://mintcdn.com/trial-7e3c8695/tLxMhymXagiR2q29/images/logo_dark.png?fit=max\u0026auto=format\u0026n=tLxMhymXagiR2q29\u0026q=85\u0026s=aefb879e0ea5a44c1272ae62eb37a3b9"},"favicon":"https://mintcdn.com/trial-7e3c8695/tLxMhymXagiR2q29/favicon.png?fit=max\u0026auto=format\u0026n=tLxMhymXagiR2q29\u0026q=85\u0026s=77e2f8f8b45fa7d39cf9304e409c6a1c","api":{"playground":{"display":"none"}},"navbar":{"links":[{"icon":"headset","href":"mailto:support@spikeapi.com","label":"Support"}],"primary":{"type":"button","label":"Admin Console","href":"https://admin.spikeapi.com/"}},"footer":{"socials":{"x":"https://x.com/spikeapi","linkedin":"https://www.linkedin.com/company/spike-api","website":"https://www.spikeapi.com/"}},"styling":{"eyebrows":"breadcrumbs","latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"trial-7e3c8695","hasAudioNarration":false,"actualSubdomain":"trial-7e3c8695","customDomains":["docs.spikeapi.com"],"gitSource":{"type":"github","owner":"spike-api","repo":"core-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a998e5e9b75209f69d7aef8","collectionId":"53afc8f8-aceb-435b-b145-ebe55f371353","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a998e5e9b75209f69d7aef8"},"entitlements":{},"buildId":"6a998e5e9b75209f69d7aef8","clientVersion":"0.0.4064","searchFilterCounts":[{"language":"default","tag":"SDK Documentation","count":34},{"language":"default","tag":"API Documentation","count":31},{"language":"default","tag":"API Reference: Querying Data","count":9},{"language":"default","tag":"Android","count":9},{"language":"default","tag":"React Native","count":9},{"language":"default","tag":"API Reference: Nutrition AI","count":8},{"language":"default","tag":"Android SDK Documentation","count":8},{"language":"default","tag":"Flutter","count":8},{"language":"default","tag":"iOS","count":8},{"language":"default","tag":"React Native SDK Documentation","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--spike-primary: #A4C8FD;--spike-background: #F5F9FE;--spike-secondary: #0E2240;--spike-primary-hover: #457CB1;--spike-success: #025555;--spike-surface: #fff;--spike-text: #0E2240;--spike-text-muted: #457CB1;--spike-warning: #f59e0b;--spike-error: #ef4444}.nav-logo{height:2.5rem!important}html:not(.dark){body {\n font-family: Inter, sans-serif !important;\n }\n \n h1, h2, h3, h4, h5, h6, .heading {\n font-family: Poppins, Arial, sans-serif !important;\n color: var(--spike-text) !important;\n font-weight: 500 !important;\n -webkit-font-smoothing: antialiased !important;\n }\n \n .page-title {\n color: var(--spike-text) !important;\n }\n\n /* Global Background */\n body, html {\n background: var(--spike-background) !important;\n }\n\n /* Pagination styling - slightly grey background */\n #pagination a {\n background: var(--spike-background) !important; /* Light grey background */\n border-color: #e9ecef !important; /* Slightly darker grey border */\n }\n\n #pagination a:hover {\n background: #e9ecef !important; /* Darker grey on hover */\n border-color: #dee2e6 !important;\n }\n\n /* Content areas use spike-surface (white) - Official Mintlify selectors */\n #content-area, #content-container, #content-side-layout,\n #footer, #panel,\n .mdx-content, .almond-layout,\n .card, .card-group, .code-block, .code-group,\n .callout, .expandable, .frame, .panel,\n .accordion, .accordion-group, .steps, .step,\n .tabs, .tab, .field,\n /* Legacy and common selectors */\n .main-wrapper, .content-wrapper, .page-wrapper, .docs-wrapper,\n .main-content, .docs-content, .page-content, .article-content,\n .mintlify-content, .prose, .markdown-body,\n [class*=\"content\"], [class*=\"main\"], [class*=\"wrapper\"],\n /* Override common white/grey backgrounds */\n .bg-white, .bg-gray-50, .bg-slate-50, .bg-neutral-50, .bg-background {\n background: var(--spike-surface) !important;\n }\n\n /* Better space utilization for content container on large screens */\n @media (min-width: 1280px) {\n #content-container {\n max-width: 90% !important;\n }\n \n #content-container .max-w-5xl {\n max-width: none !important;\n }\n }\n\n @media (min-width: 1536px) {\n #content-container {\n max-width: 85% !important;\n }\n \n #content-container .max-w-5xl {\n max-width: none !important;\n }\n }\n\n @media (min-width: 1920px) {\n #content-container {\n max-width: 80% !important;\n }\n \n #content-container .max-w-5xl {\n max-width: none !important;\n }\n }\n\n /* Navbar Colors */\n #navbar {\n background: var(--spike-background) !important;\n box-shadow: rgba(14, 34, 64, 0.2) 0px 1px 7px 0px !important;\n }\n\n /* Override Mintlify navbar background layers */\n #navbar .bg-gray-950\\/\\[0\\.03\\],\n #navbar [class*=\"bg-gray\"] {\n background: transparent !important;\n }\n\n #navbar .bg-background-light,\n #navbar .dark\\:bg-background-dark,\n #navbar [class*=\"bg-background\"] {\n background: var(--spike-background) !important;\n }\n\n /* Remove any borders that might create grey lines */\n #navbar .border-gray-200,\n #navbar .dark\\:border-gray-800 {\n border-color: transparent !important;\n }\n\n .navbar-link {\n color: var(--spike-text) !important;\n }\n\n .navbar-link:hover {\n color: var(--spike-primary) !important;\n }\n\n /* Sidebar Colors */\n #sidebar {\n background: var(--spike-surface) !important;\n }\n\n .sidebar-title {\n color: var(--spike-secondary) !important;\n }\n\n .nav-anchor {\n color: var(--spike-text-muted) !important;\n }\n\n .nav-anchor:hover {\n color: var(--spike-primary) !important;\n background: var(--spike-primary-light) !important;\n }\n\n .nav-anchor.active {\n color: var(--spike-primary) !important;\n background: var(--spike-primary-light) !important;\n }\n /* Button Colors */\n .tryit-button, .topbar-cta-button {\n background: var(--spike-primary) !important;\n color: white !important;\n }\n\n .tryit-button:hover, .topbar-cta-button:hover {\n background: var(--spike-primary-hover) !important;\n }\n\n /* Method Pill Colors */\n .method-pill[data-method=\"get\"] {\n background: var(--spike-success) !important;\n color: white !important;\n }\n\n .method-pill[data-method=\"post\"] {\n background: var(--spike-primary) !important;\n color: white !important;\n }\n\n .method-pill[data-method=\"put\"] {\n background: var(--spike-warning) !important;\n color: white !important;\n }\n\n .method-pill[data-method=\"delete\"] {\n background: var(--spike-error) !important;\n color: white !important;\n }\n\n /* Code Block Colors */\n .code-block {\n background: var(--spike-surface) !important;\n }\n\n /* Card Colors */\n .card {\n background: var(--spike-surface) !important;\n }\n\n /* Table of Contents Colors */\n #table-of-contents {\n background: var(--spike-surface) !important;\n }\n\n .toc-item {\n color: var(--spike-text) !important;\n }\n\n .toc-item:hover {\n color: var(--spike-primary) !important;\n }\n\n /* Search Colors */\n #search-input, #search-bar-entry {\n background: var(--spike-surface) !important;\n }\n\n #search-input:focus, #search-bar-entry:focus {\n border-color: var(--spike-primary) !important;\n }\n\n /* Override search button background classes */\n #search-bar-entry.bg-background-light {\n background: var(--spike-surface) !important;\n }\n\n /* Pagination Colors */\n .pagination-next, .pagination-prev {\n color: var(--spike-text) !important;\n }\n\n .pagination-next:hover, .pagination-prev:hover {\n color: var(--spike-primary) !important;\n }}.mermaid svg .actor-bottom{display:none!important}html:not(.dark) .mermaid svg .actor rect{fill:var(--spike-background)!important;stroke:var(--spike-primary)!important}html:not(.dark) .mermaid rect.actor{fill:var(--spike-background)!important;stroke:var(--spike-primary)!important}html:not(.dark) .mermaid .actor{fill:var(--spike-background)!important;stroke:var(--spike-primary)!important}html:not(.dark) .mermaid svg .actor text{fill:var(--spike-secondary)!important}html:not(.dark) .mermaid svg text.actor{fill:var(--spike-secondary)!important}html:not(.dark) .mermaid svg text.actor-box{fill:var(--spike-secondary)!important}html:not(.dark) .mermaid svg .actor-line{stroke:var(--spike-primary-hover)!important}html:not(.dark) .mermaid svg .note{fill:var(--spike-surface)!important;stroke:var(--spike-primary)!important}html:not(.dark) .mermaid svg .labelBox{fill:var(--spike-surface)!important;stroke:var(--spike-primary-hover)!important}"}],"page":{"pagePath":"sdk-docs/flutter/background-delivery","slug":"/sdk-docs/flutter/background-delivery","pageMetadata":{"title":"Flutter SDK Background Delivery","icon":"truck-fast","sidebarTitle":"Background Delivery","description":"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.","href":"/sdk-docs/flutter/background-delivery"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`ios`,children:`iOS`}),`\n`,_jsx(Heading,{level:`3`,id:`important-notes-about-background-delivery-on-ios`,children:`Important Notes About Background Delivery on iOS`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`For most data types, the most possible frequency of updates is 1 hour.`}),`\n`,_jsx(_components.li,{children:`iOS can update data more frequently for some data types, for example, vo2 max.`}),`\n`,_jsx(_components.li,{children:`iOS may throttle the frequency of updates for background delivery depending on the app’s activity, battery state, etc.`}),`\n`,_jsx(_components.li,{children:`Background delivery is not possible while a device is locked, so it will be executed only when the device is unlocked.`}),`\n`,_jsx(_components.li,{children:`iOS may stop background delivery if it detects that the app is not active for a long time.`}),`\n`,_jsx(_components.li,{children:`The feature is available starting with iOS 15.`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important:`}),` The Spike SDK, along with any other HealthKit applications, cannot guarantee data synchronization on a fixed schedule. The hourly sync\ninterval serves as a guideline rather than a strict requirement enforced by iOS. Consequently, the actual synchronization frequency may vary,\noccurring hourly, once per day, or during specific system-defined events, such as the conclusion of Sleep Mode or when the device begins charging.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`setup`,children:`Setup`}),`\n`,_jsx(Heading,{level:`4`,id:`enable-background-delivery-for-the-application-target`,children:`Enable Background Delivery for the Application Target`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Open XCode with your ios project`}),`\n`,_jsx(_components.li,{children:`Open the folder of your project in Xcode`}),`\n`,_jsx(_components.li,{children:`Select the project name in the left sidebar`}),`\n`,_jsx(_components.li,{children:`Open the Signing \u0026 Capabilities section`}),`\n`,_jsx(_components.li,{children:`Select HealthKit background delivery under the HealthKit section`}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`initialization-at-application-startup`,children:`Initialization at Application Startup`}),`\n`,_jsx(_components.p,{children:`For background delivery to work properly, you need to initialize the Spike SDK at app startup.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AppDelegate.swift`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SpikeSDK`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` override`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` application`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` application`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: UIApplication, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`didFinishLaunchingWithOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` launchOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [UIApplication.LaunchOptionsKey : `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Any`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Spike.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`configure`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`android`,children:`Android`}),`\n`,_jsx(Heading,{level:`3`,id:`important-notes-about-background-delivery-on-android`,children:`Important Notes About Background Delivery on Android`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Background delivery is scheduled to run every hour, but ultimately, Android decides when the delivery will be executed.`}),`\n`,_jsx(_components.li,{children:`Android may throttle the frequency of updates for background delivery depending on the app’s activity, battery state, etc.`}),`\n`,_jsx(_components.li,{children:`Android may stop background delivery if it detects that the app is not active for a long time.`}),`\n`,_jsxs(_components.li,{children:[`There is a limit of queries that can be done in Health Connect, and it is different for foreground and background reads, so please request only essential data to be delivered in the background. More information in `,_jsx(`a`,{href:`https://developer.android.com/health-and-fitness/guides/health-connect/plan/rate-limiting`,target:`_blank`,children:`Health Connect documentation`}),`.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important`}),`: The Spike SDK, along with any other applications, cannot guarantee data synchronization on a fixed schedule. The hourly sync interval serves as a guideline rather than a strict requirement enforced by Android. Consequently, the actual synchronization frequency may vary, occurring hourly, once per day, or during specific system-defined events, such as the conclusion of Sleep Mode or when the device begins charging.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`setup-2`,children:`Setup`}),`\n`,_jsxs(_components.p,{children:[`Add the following permission to your `,_jsx(_components.code,{children:`AndroidManifest.xml`}),` (for Google Health Connect):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`xml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`xml`,children:_jsxs(_components.code,{language:`xml`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses-permission`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` android:name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` />`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`flutter-specific`,children:`Flutter Specific`}),`\n`,_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`includeBackgroundDelivery: true`}),` when asking for Health Connect permissions:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`dart`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`dart`,children:_jsxs(_components.code,{language:`dart`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` final`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` connection.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`requestHealthPermissions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` statisticTypes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`StatisticsType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.steps],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` includeBackgroundDelivery`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`on`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` SpikeException`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (e) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Error: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You can also ask for background delivery permission at the same time as other permissions.`}),`\n`,_jsx(_components.p,{children:`Now you can enable background delivery:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`dart`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`dart`,children:_jsxs(_components.code,{language:`dart`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` connection.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`enableBackgroundDelivery`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` statisticTypes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`StatisticsType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.steps],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sleepConfigs`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` SleepConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(includeMetricTypes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`MetricType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.heartrate})`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`on`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` SpikeException`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (e) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Error: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Keep in mind that calling `,_jsx(_components.code,{children:`enableBackgroundDelivery()`}),` will overwrite previous configuration. So you have to call it with all the data types you want in one call.`]}),`\n`,_jsxs(_components.p,{children:[`To check current configuration call `,_jsx(_components.code,{children:`getBackgroundDeliveryConfig()`}),` method.`]}),`\n`,_jsxs(_components.p,{children:[`To stop background delivery call `,_jsx(_components.code,{children:`disableBackgroundDelivery()`}),` method.`]}),`\n`,_jsx(Heading,{level:`2`,id:`samsung-health`,children:`Samsung Health`}),`\n`,_jsxs(_components.p,{children:[`If Samsung Health Data is enabled before enabling background delivery, `,_jsx(_components.code,{children:`enableBackgroundDelivery`}),` will automatically enable Samsung Health Data background delivery.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Flutter SDK Background Delivery","icon":"truck-fast","sidebarTitle":"Background Delivery","description":"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.","href":"/sdk-docs/flutter/background-delivery"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"iOS","slug":"ios","depth":2,"children":[{"title":"Important Notes About Background Delivery on iOS","slug":"important-notes-about-background-delivery-on-ios","depth":3,"children":[]},{"title":"Setup","slug":"setup","depth":3,"children":[]},{"title":"Enable Background Delivery for the Application Target","slug":"enable-background-delivery-for-the-application-target","depth":4,"children":[]},{"title":"Initialization at Application Startup","slug":"initialization-at-application-startup","depth":4,"children":[]}]},{"title":"Android","slug":"android","depth":2,"children":[{"title":"Important Notes About Background Delivery on Android","slug":"important-notes-about-background-delivery-on-android","depth":3,"children":[]},{"title":"Setup","slug":"setup-2","depth":3,"children":[]}]},{"title":"Flutter Specific","slug":"flutter-specific","depth":2,"children":[]},{"title":"Samsung Health","slug":"samsung-health","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"trial-7e3c8695","siteName":"Spike API","title":"Flutter SDK Background Delivery - Spike API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-27T08:49:54.906Z","originalFileLocation":"sdk-docs/flutter/background-delivery.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Spike API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Flutter SDK Background Delivery - Spike API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Spike API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://trial-7e3c8695.mintlify.app/_mintlify/api/og/v2?division=Flutter+SDK+Documentation\u0026amp;title=Flutter+SDK+Background+Delivery\u0026amp;description=Background+delivery+ensures+that+data+updates+are+sent+to+your+backend+via+webhooks%2C+even+when+the+application+is+in+the+background+or+closed.\u0026amp;theme=7cc5474a77bf202e013c570b\u0026amp;signature=5f5701f39b385c1622ee9abfa800160a27c6d0a408054cd19aeb7ea0297120f1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Flutter SDK Background Delivery - Spike API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://trial-7e3c8695.mintlify.app/_mintlify/api/og/v2?division=Flutter+SDK+Documentation\u0026amp;title=Flutter+SDK+Background+Delivery\u0026amp;description=Background+delivery+ensures+that+data+updates+are+sent+to+your+backend+via+webhooks%2C+even+when+the+application+is+in+the+background+or+closed.\u0026amp;theme=7cc5474a77bf202e013c570b\u0026amp;signature=5f5701f39b385c1622ee9abfa800160a27c6d0a408054cd19aeb7ea0297120f1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/trial-7e3c8695/Vf-2TqFNQYSDp2gp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Spike API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0E2240\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk-docs/flutter/background-delivery.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.spikeapi.com/#organization\",\"name\":\"Spike API\",\"url\":\"https://docs.spikeapi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/trial-7e3c8695/C_wqhbtsn7F05yl4/images/logo.svg?fit=max\u0026auto=format\u0026n=C_wqhbtsn7F05yl4\u0026q=85\u0026s=435095cb4c721a082a83f3ad17fa156c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.spikeapi.com#website\",\"name\":\"Spike API\",\"url\":\"https://docs.spikeapi.com\",\"publisher\":{\"@id\":\"https://docs.spikeapi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery#webpage\",\"url\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery\",\"name\":\"Flutter SDK Background Delivery\",\"description\":\"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.\",\"dateModified\":\"2026-01-27T08:49:54.906Z\",\"isPartOf\":{\"@id\":\"https://docs.spikeapi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Flutter SDK Documentation\",\"item\":\"https://docs.spikeapi.com/sdk-docs/flutter/setup\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flutter SDK Background Delivery\",\"item\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery#article\",\"headline\":\"Flutter SDK Background Delivery\",\"name\":\"Flutter SDK Background Delivery\",\"description\":\"Background delivery ensures that data updates are sent to your backend via webhooks, even when the application is in the background or closed.\",\"url\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery\",\"mainEntityOfPage\":{\"@id\":\"https://docs.spikeapi.com/sdk-docs/flutter/background-delivery#webpage\"},\"dateModified\":\"2026-01-27T08:49:54.906Z\",\"publisher\":{\"@id\":\"https://docs.spikeapi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.spikeapi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Spike API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Spike API","nav":{"global":null,"tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":"/overview"}]},{"tab":"API Documentation","pages":[{"title":"API Documentation","href":"/api-docs/overview"}]},{"tab":"SDK Documentation","menu":[{"item":"iOS","icon":"apple","pages":[{"title":"iOS","href":"/sdk-docs/ios/overview"}]},{"item":"Android","icon":"android","pages":[{"title":"Android","href":"/sdk-docs/android/overview"}]},{"item":"React Native","icon":"react","pages":[{"title":"React Native","href":"/sdk-docs/react-native/overview"}]},{"item":"Flutter","icon":"flutter","groups":[{"group":"About","pages":[{"title":"Flutter SDK Overview","icon":"circle-info","sidebarTitle":"Overview","href":"/sdk-docs/flutter/overview"}]},{"group":"Flutter SDK Documentation","pages":[{"title":"Flutter SDK Setup","icon":"gear","sidebarTitle":"Setup Guide","href":"/sdk-docs/flutter/setup"},{"title":"Flutter SDK Usage Guide","icon":"rocket","sidebarTitle":"Usage Guide","href":"/sdk-docs/flutter/usage-guide"},{"title":"Flutter SDK for Samsung Health","icon":"stripe-s","sidebarTitle":"Samsung Health","description":"Start getting Spike data in 3 steps using Spike SDK for Samsung Health Data on Flutter platform.","href":"/sdk-docs/flutter/usage-guide-shd"},{"title":"Flutter SDK Background Delivery","icon":"truck-fast","sidebarTitle":"Background Delivery","href":"/sdk-docs/flutter/background-delivery"},{"title":"Flutter SDK Nutrition AI","icon":"plate-utensils","sidebarTitle":"Nutrition AI","description":"Analyze food images and retrieve nutritional information using AI-powered analysis in your Flutter app.","href":"/sdk-docs/flutter/nutrition-ai"},{"title":"Flutter SDK Logging","icon":"file-waveform","sidebarTitle":"Logging","href":"/sdk-docs/flutter/logging"},{"title":"Flutter SDK Changelog","icon":"code-commit","sidebarTitle":"Changelog","href":"/sdk-docs/flutter/changelog"}]}]}]},{"tab":"Nutrition AI","pages":[{"title":"Nutrition AI","href":"/nutrition-ai/overview"}]},{"tab":"Lab Reports","hidden":false,"pages":[{"title":"Lab Reports","href":"/lab-reports/overview"}]},{"tab":"Spike Care Benefits Checks","hidden":true,"pages":[{"title":"Spike Care Benefits Checks","href":"/api-spike-care/overview"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp-docs/overview"}]},{"tab":"Technical References","pages":[{"title":"Technical References","href":"/technical-references/application_configuration"}]}]},"basePath":"","title":"Flutter SDK Background Delivery - Spike API","buildId":"dpl_2gSLkbMoF5kkLsBqYzq9KWtDyJRo","deploymentId":"dpl_2gSLkbMoF5kkLsBqYzq9KWtDyJRo","dynamics":[],"chunks":[]}