# Reliable background delivery

How AppPortal SDKs preserve telemetry through poor connectivity without adding flush or shutdown work to application code.

Source: https://appportal.io/docs/concepts/reliable-delivery

AppPortal SDKs are designed for applications that move between strong, weak, and unavailable
networks. Capturing an event, log, error, crash, session, or performance marker does not wait for a
round trip to AppPortal. The SDK accepts the record locally and sends it in the background.

## Capture first, deliver in the background

The SDK accepts records into its local queue. A background worker sends batches and retries
transient failures with backoff. Whether unsent records survive a restart depends on the runtime:

| Runtime | Local storage |
| --- | --- |
| Native Apple and Android | App-private durable journal |
| .NET native and managed runtimes | Native or managed durable journal; check the selected host |
| Uno WebAssembly | In-memory queue; reloads can lose unsent records |
| Flutter mobile, desktop, and web | Current source: [bounded, asynchronous preferences queue](https://appportal.io/docs/sdks/flutter#know-the-current-limits); compatible published package unverified |

This gives application code a small, predictable surface:

- capture calls remain fast and do not depend on current connectivity;
- queued records can retry during temporary network failures, subject to storage and retention limits;
- stable record identifiers let the service recognize delivery retries;
- applications never need to call a public flush or close method.

Use the [compatibility guide](https://appportal.io/docs/sdks/compatibility) to check your exact host. A successful
capture call is local acceptance, not confirmation that a dashboard query already contains it.

## One environment-specific app credential

Each application environment has its own app credential. The dashboard provides the setup values
for the framework and environment you are shipping, and the service validates that credential
before accepting app-side data.

An app credential is intentionally limited because it is distributed inside a client application.
It can record client telemetry and use approved app-side capabilities, but it cannot send paid
push or SMS messages, manage audiences, administer an organization, or upload a release.

Customer backends and release pipelines use separate, permissioned credentials. That separation
keeps ordinary app telemetry simple while protecting server-to-server operations with stronger
authority and rotation policies.

## Consent and identity

Collection consent starts pending: telemetry stays quarantined locally. Granting consent allows
delivery; denying or revoking it erases unsent records and stops capture. Resetting returns to
pending. A change cannot recall telemetry already delivered.

Saved decisions take precedence over the initial policy. Workforce applications can configure
initial consent where their policy permits; consumer apps should connect the decision to their
privacy experience. Flutter restores decisions from platform preferences before delivery, with
asynchronous writes that may be interrupted by abrupt termination.

User identity is optional and consists of one application-chosen value; a separate name or profile
is not required. Prefer a stable opaque identifier for applications that need to minimize personal
data. Applications may choose another value where their privacy policy permits it; that value
accompanies subsequent telemetry. Identifying a user does not grant consent. Installation IDs are SDK-generated,
not hardware fingerprints; Flutter does not yet keep its installation ID stable across launches.

Next, choose the [Apple](https://appportal.io/docs/sdks/apple), [Android](https://appportal.io/docs/sdks/android),
[.NET](https://appportal.io/docs/sdks/dotnet), or [Flutter](https://appportal.io/docs/sdks/flutter) guide to instrument an application.
