Skip to main content

Application Directives


At a Glance
  • Your system controls registration and login.
  • Air Doctor accepts an external token.
  • Air Doctor hides all account-management screens.
  • You set embedded=true.
  • Air Doctor sends ready.
  • Your system responds with token={TOKEN}.

The Air Doctor app can be configured at startup by using a directives URL parameter. This parameter accepts a comma-separated list of key=value pairs. The value is optional and defaults to true when omitted.

For example:

https://www.air-dr.com/app/?directives=lat=12.34,lng=-56.78,embedded

In this example, the URL sets latitude and longitude and enables embedded, which is enabled with the implicit value true. You can combine directives in any order. The app accepts directive in any order and ignores unknown values.

Supported Directives

The following table summarizes each directive.

DirectivePurposeTypical Use
lat, lngProvide explicit coordinatesOverride device location
embeddedEnable host-managed authenticationUse an external auth flow
desktopRequest a wide-screen layoutRender inside a large desktop container
skip-fontDisable font-based iconsSupport SVG-only integrations

lat and lng

Provide explicit device coordinates as decimal degrees.

Example: lat=12.34,lng=-56.78

When both lat and lng appear:

  • The app does not request geolocation permissions from the browser or WebView.
  • The app uses the provided coordinates for all location-based features, such as searching nearby clinics and doctors.
  • The host can supply updated coordinate by reloading the app with new values, although coarse coordinates rarely require updates.

If only one value appears, the directive set is incomplete and the app uses standard geolocation behavior.

Use lat and lng when:
  • The integration supplies its own location source.
  • The host environment lacks geolocation capability.

embedded

Indicates that an external integration controls authentication.

When embedded=true:

  • On startup, the app waits for an authentication token from the host instead of showing its own login and registration screens.
  • The app sends a "ready" message to the host (through postMessage on web or the native bridge on mobile) to signal readiness to receive the token.
  • After the host responds with token={TOKEN}, the app authenticates the session and the account-management UI (login, registration, password reset, and related screens) does not appear.
Use embedded when:
  • Your host handles authentication.
  • You embed the app inside a controlled environme

desktop

Instructs the server to produce a wide-screen desktop layout.

When desktop=true:

  • The UI switches to a layout optimized for large viewports, including wider panels and multi-column views.
  • This directive is useful when Air Doctor runs (as in, you embeded) inside a desktop-style container, such as a large iframe or desktop WebView where mobile breakpoints would otherwise trigger.
note

The app does not use automation detection logic for desktop environments and defaults to a mobile layout on any viewport without this directive.

Use desktop when:
  • Your container provides a desktop-size viewport.
  • Your design requires a wide-screen layout.

skip-font

Disables font-based icon optimization for integration levels 4 and above.

When skip-font=true:

  • The server avoids sending Air Doctor icon font code points (web-font-based icon sets).
  • The app receives references to standalone icon assests, such as SVGs or image files.

If skip-font is not used, the app uses its standard font-based icon set for optimal bundle size performance.

Use skip-font when:
  • Your environment blocks custom fonts.
  • You rely on an SVG-only asset pipeli