Webportal v2

embedded apps

API Reference - app.loadingStatus

Required Privacy: Data & Location
Operation:

This API allows to work with status of your app in the infotainment system.

Status Description
stopped This event should not be set. Indeed it is the default status of the App when it’s not launched.
loading Once the user touch the App icon, a spinner will appear on the screen until the App is ready.
running When your App is ready (meaning that application & data are loaded) you have to set this status.
connection_impossible Most of the time, this event is set by the infotainment itself. But if you app encounter a connection error, you can choose to delegate it to the infotainment system. If you do so, your app will close and a reloadd window will appear to the user.
unknown_error Most of the time, this event is set by the infotainment itself. But if you app encounter an error, you can choose to delegate it to the infotainment system. If you do so, your app will close and an error window will appear to the user.
Input Parameter
Param name Description Type Unit/Values Example Required
status

New status.

Enum of strings

- stopped

- loading

- running

- connection_impossible

- unknown_error
connection_impossible true
Output Data
No outputted data
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
webportal.set(
    /* api name */
    "app.loadingStatus",
    /* parameters */
    "connection_impossible"
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "SET", 
  "api": "app.loadingStatus",
  "params": "connection_impossible"
}
1
2
3
4
5
6
7
8
9
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "app.loadingStatus",
  "status": 200,
  "statusText": "OK"
}

false