Configuration

Navigate to /public/static/config/config.json and locate the AppStore section.
Do not change the redirect value — it tells the phone where to route requests.

Configuration Properties

name
string
required
Display name of the app
icon
string
required
Path to the app icon
url
string
required
Website URL to display (must support iFrame) or a self-hosted HTML file
custom_app_id
string
required
Unique identifier for your app. Set once and never change it.
darkmode
boolean
default:"false"
Changes header and home button theme
allowJobs
array
List of jobs that can access this app
disallowJobs
array
List of jobs that cannot access this app
custom_event
object
Event configuration with the following properties:

Examples

Website App

{
  "name": "CustomApp",
  "icon": "/public/img/Apps/custom.jpg",
  "default": true,
  "category": "apps",
  "custom_app_id": "SET_YOUR_OWN_ID_DONT_CHANGE_AFTERWARDS_NO_DOUBLE_ID",
  "redirect": "custom_app",
  "url": "https://www.test.com",
  "darkmode": false,
  "allowJobs": [],
  "disallowJobs": [],
  "custom_event": {
    "active": false,
    "closeWhenOpenApp": false
  }
}

Self-Developed App

{
  "name": "Template App",
  "icon": "/public/img/Apps/custom.jpg",
  "default": true,
  "category": "apps",
  "custom_app_id": "TEMPLATE_APP_1",
  "redirect": "custom_app",
  "url": "https://cfx-nui-roadphone-app-template/html/static/index.html",
  "darkmode": true,
  "allowJobs": [],
  "disallowJobs": [],
  "custom_event": {
    "active": false,
    "closeWhenOpenApp": false
  }
}

NUI Messaging

-- Send a custom event to your app
exports['roadphone']:SendMessageNUI({
  customevent = "yourEvent",
  data = "yourData"
})

Exports

Input Focus Control

Control the NUI focus behavior for the phone:
exports['roadphone']:inputFocus(boolean) -- true or false
Use true to enable input focus (keyboard/mouse control) and false to disable it.