Skip to main content

Dedicated Device Settings

Dedicated Setting HTML lets a producer create a product-specific configuration page that is loaded inside the AirNgin application.

This feature is optional. Use it when your Device needs settings beyond the standard Operation controls.

Runtime context​

The mobile application loads the HTML page with query parameters that identify the current project, Device, and Operation:

https://example.com/htmlPage.html?projectId=xxxxxx&deviceSerial=xxxxxx&token=xxxxxx&operationName=xxxxxx&operationId=xxxxxx

The page receives:

  • projectId — current Project identifier;
  • token — temporary Bearer token for the documented APIs;
  • deviceSerial — current AirNgin DeviceSerial;
  • operationName — selected Operation name;
  • operationId — selected Operation identifier.

Example query-string parsing:

$(document).ready(function() {
const urlParams = new URLSearchParams(window.location.search);
const projectId = urlParams.get('projectId');
const token = urlParams.get('token');
const deviceSerial = urlParams.get('deviceSerial');
const operationName = urlParams.get('operationName');
const operationId = urlParams.get('operationId');
});

Use only the documented APIs and pass the temporary token as a Bearer token. Do not embed permanent credentials in the HTML page.