Skip to content

Custom menu schemas

The Custom Menu (Scren) is a collection of widgets (Mbut) that are displayed on a driver's interface. It is defined by a list of widget definitions, allowing for flexible customization of the driver's menu. Each widget added to this menu can perform different actions, such as synchronizing data, navigating to lists, or launching external applications, thereby enhancing the driver's ability to manage tasks efficiently.

Widgets (Mbut) are individual elements that can be configured to appear on the Custom Menu. Each widget is defined by parameters like action, position, size, and style settings. The versatility of widgets allows developers to create dynamic menus tailored to the driver's specific needs.

The Widget Action (Buta) parameter specifies the type and behavior of the widget. This parameter defines what the widget will display and how it will interact with the driver. For example, the Sync action triggers data synchronization, while triplist and roomlist navigate to lists of trips and chat rooms respectively. Additional actions like the Driver’s File Storage (Dbox), Document Scanner (Docr), and External App Launcher (Launchactivity) further extend the capabilities of widgets. These components provide predefined actions and behaviors, ensuring that common tasks can be integrated seamlessly into the custom menu.

Custom menu (Scren)

Custom menu of a driver.

{  
    "rgmbut": [  
        mbut-1,  
        …,  
        mbut-N  
    ]  
}  

Fields

rgmbutlist of mbutList of widget definitions to appear in the drivers menu.

Widget (Mbut)

A widget that can appear on a custom menu.

{  

    "buta": buta,  
    "ptd": ptd,  
    "szd": szd,  
    "busty": busty,  
     "rgnotd": [notd1, …, notdN]  
}  

Fields

butabutaEntity describing the widgets action and displayed data.
ptdptdWidget position.
szdszdWidget size.
bustybusty
(optional)
Widget appearance.
rgnotdlist of notdList of custom notifications to be shown to the user when the screen is downloaded.

Widget action (Buta)

Describes the action performed and/or the data displayed by the widget.

{  
    "k": kbuta,  
    other-parameters  
 }  

Fields

kstringWidget type. Either sync, triplist, roomlist, dbox, docr or launchactivity.
other-parametersOther parameters describing the behavior of the widget. Depends on the widget type.

Synchronization indicator (Sync)

Shows a button that triggers synchronization with the backend when pressed. Also displays the state of any ongoing synchronization and warns about any staleness of the data..

{  
    "k": "sync"  
}  

Shows a button that navigates to the list of trips assigned to the driver. Also displays the number of updated or new trips yet unread by the driver.

{  
    "k": "triplist"  
}  

Shows a button that navigates to the list of chat rooms the driver is a member of. Also displays the number of new messages in all chat rooms yet unread by the driver.

{  
    "k": "roomlist"  
}  

Shows a button that navigates to the list of documents uploaded to the driver’s file storage. Also displays the number of updated or new documents yet unread by the driver.

{  
    "k": "dbox"  
}      

Scan document (Docr)

Shows a button that allows the driver to scan and submit a new document. The document type can be configured via the kdocr field.

{  
    "k": "docr",  
    "kdocr": "gdam"  
}  

Fields

kstringMust be docr.
kdocrkdocrThe type of document to be scanned.

Launch external app (Launchactivity)

Shows a button that allows the driver to launch an external application on the device.

{  
    "k": "launchactivity",  
    "inspe": {  
        "oaction": "android.intent.action.MAIN",  
        "orgcat": ["android.intent.category.APP_CALCULATOR"]  
     }  
}  

Fields

kstringMust be launchactivity.
inspeinspeThe Android Intent to be fired when the button is pressed.

Android intent (Inspe)

Describes the Android Intent that is to be fired when the user presses a Launch External App button on the menu.

{  
    "oaction": intent-action,  
    "orgcat": [cat-1, …, cat-N],  
    "ocompn": component-name,  
    "odata": data-uri,  
    "omime": mime-type,  
    "ompextra": intent-extras  
}  

Fields

oactionstring (optional)The intent action. See also android: Intent.setAction.
orgcatlist of strings (optional)The list of intent categories the launched component must handle in order to be resolved for this intent.

ocompn

compn (optional)

The explicit name of the target component to be launched by this intent. Intents that specify an explicit target component are called explicit intents and are not subject to implicit resolution.

See also android: Intent.setComponent.

odata

string (optional)

The uri of the data to be passed by this intent.

See also android: Intent.setData.

omimestring (optional)The mime-type of the data provided by the data uri specified in odata. When omitted, the mime-type will be automatically inferred from odata. See also android: Intent.setDataAndType.

ompextra

mpextra (optional)

Extra parameters to be passed to the target component launched by this intent.

See also android: Intent.putExtras.

Component name (Compn)

Specifies the exact target component to be executed by an intent. See also android: ComponentName.

{  
    "packagen": "com.example.sampletargetapp",  
    "classn": "com.example.sampletargetapp.TargetActivity"  
 }  

Fields

packagenstringThe package name of the component. See also android: ComponentName.getPackageName.

classn

string

The class name of the component.

See also android: ComponentName.getClassName

Intent extras (Mpextra)

Specifies a list of named parameters to be passed to the target component.

{  
    "parameter-name-1": extra-value-1,  
    …,  
    "parameter-name-N": extra-value-N,  
 }  

Fields

parameter-namestringThe name of the parameter to pass to the target component.
extra-valueEvThe type and value of the parameter.

Extra value (Ev)

Specifies a single parameter value along with its type. Can be one of the following.

Evbyte

A parameter of type byte.

{  
    "k": "byte",  
    "v": 255  
}  

Fields

kKevMust be byte.
vbyteThe value of the parameter to pass to the target

Evshort

A parameter of type short.

{  
    "k": "short",  
    "v": 128  
 }  

Fields

kKevMust be short.
vshortThe value of the parameter to pass to the target

Evint

A parameter of type int.

{  
    "k": "int",  
    "v": 2147483647  
}  

Fields

kKevMust be int.
vintThe value of the parameter to pass to the target

Evlong

A parameter of type long.

{  
    "k": "long",  
    "v": 9223372036854775807  
 }  

Fields

kKevMust be long.
vlongThe value of the parameter to pass to the target

Evfloat

A parameter of type float.

{  
    "k": "float",  
    "v": 3.14  
}  

Fields

kKevMust be float.
vfloatThe value of the parameter to pass to the target

Evdouble

A parameter of type double.

{  
    "k": "double",  
    "v": 3.14   
}  

Fields

kKevMust be double.
vdoubleThe value of the parameter to pass to the target

Evboolean

A parameter of type boolean.

{  
    "k": "boolean",  
    "v": true  
}  

Fields

kKevMust be boolean.
vbooleanThe value of the parameter to pass to the target

Evstring

A parameter of type string.

{  
    "k": "string",  
    "v": "Hello World!"  
}  

Fields

kKevMust be string.
vstringThe value of the parameter to pass to the target

Evchar

A parameter of type char.

{  

    "k": "char",  
    "v": "H"  
}  

Fields

kKevMust be char.
vcharThe value of the parameter to pass to the target

Evbytearray

A parameter of type array of bytes.

{  
    "k": "bytearray",  
    "v": [1, 2, …, 255]  
}  

Fields

kKevMust be bytearray.
vlist of byteThe value of the parameter to pass to the target

Evshortarray

A parameter of type array of shorts.

{  

    "k": "shortarray",  
    "v": [-127, -126, …, 128]  
}  

Fields

kKevMust be shortarray.
vlist of shortThe value of the parameter to pass to the target

Evintarray

A parameter of type array of integers.

{  
    "k": "intarray",  
    "v": [-2147483648, …, 2147483647]  
}  

Fields

kKevMust be intarray.
vlist of intThe value of the parameter to pass to the target

Evlongarray

A parameter of type array of longs.

{  
    "k": "longarray",  
    "v": [-9223372036854775808, …, 9223372036854775807]  
}  

Fields

kKevMust be longarray.
vlist of longThe value of the parameter to pass to the target

Evfloatarray

A parameter of type array of floats.

{  
    "k": "floatarray",  
    "v": [-3.14, …, 3.14]  
}  

Fields

kKevMust be floatarray.
vlist of floatThe value of the parameter to pass to the target

Evdoublearray

A parameter of type array of doubles.

{  
    "k": "doublearray",  
    "v": [-3.14, …, 3.14]  
}  

Fields

kKevMust be doublearray.
vlist of doubleThe value of the parameter to pass to the target

Evbooleanarray

A parameter of type array of booleans.

{  

    "k": "booleanarray",  
    "v": [false, true, …, true]  
}  

Fields

kKevMust be booleanarray.
vlist of booleanThe value of the parameter to pass to the target

Evstringarray

A parameter of type array of strings.

{  
    "k": "stringarray",  
    "v": ["Hello", "World", "!"]  
}  

Fields

kKevMust be stringarray.
vlist of stringThe value of the parameter to pass to the target

Evchararray

A parameter of type array of chars.

{  
    "k": "chararray",  
    "v": ["H", "e", "l", …, "!"]  
}  

Fields

kKevMust be chararray.
vlist of charThe value of the parameter to pass to the target

Evintegerarraylist

A parameter of type arraylist of integers.

{  
    "k": "integerarraylist",  
    "v": [-2147483648, …, 2147483647]  
}  

Fields

kKevMust be integerarraylist.
vlist of intThe value of the parameter to pass to the target

Evstringarraylist

A parameter of type arraylist of strings.

{  
    "k": "stringarraylist",  
    "v": ["Hello", "World", "!"]  
}  

Fields

kKevMust be stringarraylist.
vlist of stringThe value of the parameter to pass to the target

Evjson

A parameter of type string containing arbitrary json-formatted data.

{  

    "k": "json",  
    "v": {  
        "Hello": "World"  
    }  
}  

Fields

kKevMust be json.
vjsonArbitrary json content. Will be passed as a string parameter holding the content of this field.

The above sample is a syntax sugar for the following

{  

    "k": "string",  
    "v": "{\"Hello\":\"World\"}"  
 }  

Widget position (Ptd)

Specifies position of the top-left corner of the widget on the screen.

{  
    "x": 4,  
    "y": 7.5  
}  

Fields

xnumberThe horizontal position of the widget in layout coordinate units.
ynumberThe vertical position of the widget in layout coordinate units.

Layout coordinates

Widgets are laid out on the screen using a density-independent coordinate system.

The x axis of the coordinate system is divided into 9 equi-distant units. This axis always corresponds to the shorter edge of the screen, hence it is horizontal in portrait orientation and vertical in landscape orientation.

The y axis of the coordinate system is divided into 16 equi-distant units. This axis always corresponds to the longer edge of the screen, hence it is vertical in portrait orientation and horizontal in landscape orientation.

When changing orientation, the coordinate system is mirrored around the x=y line, or in other words it is mirrored along the vertical axis and then rotated by 90 degrees counterclockwise.

The (x: 0, y: 0) coordinate points to the top-left corner of the screen, whereas the (x: 9, y: 16) coordinate points to the bottom-right corner of the screen. The coordinate system maintains aspect ratio and thus a rectangle of (dx: 1, dy: 1) represents a square on the screen.

In portrait orientation (x: 9, y: 0) points to the top-right corner of the screen whereas in landscape orientation it points to the bottom-left corner of the screen. Similarly, (x: 0, y: 16) points to the bottom-left corner of the screen in portrait orientation and points to the top-right corner of the screen in landscape orientation.

Widget size (Szd)

Specifies size of the widget on the screen.

{  

    "dx": 4,  
    "dy": 7.5  
}  

Fields

dxnumberThe horizontal size of the widget in layout coordinate units.
dynumberThe vertical size of the widget in layout coordinate units.

Widget style (Busty)

Specifies visual appearance of the widget.

{
    "ost18Text": {
        "_": "Messages",
        "hu": "Üzenetek",
        "de": "Mitteilungen",
        "it": "Messaggi",
    },
    "okico": "Material.Filled.Messages",
    "ocolBg": "20d0d0d0",
    "ocolFg": "ffd0d0d0",
    "okrund": {
        "k": "relative",
        "percent": "50",
    }
}

Fields

ost18TextSt18 (optional)The internationalized label of the widget. If omitted, the widget will have no label, or for system widgets, will have a default label provided by the app.
okicoKico (optional)The icon of the widget. If omitted, the widget will have no icon, or for system widgets, will have a default icon provided by the app.
ocolBgColor (optional)The background color of the widget. If omitted, the background will be semi-transparent blue, except for system widgets, which will provide a background color based on their contents.
ocolFgColor (optional)The foreground color of the widget. If omitted, the foreground will be opaque white.
okrundKrund (optional)The corner radius of the widget. If omitted, the widget will have a circular shape.

Internationalized text (St18)

Specifies an internationalized text.

{  
    "_": "Messages",  
    "locale-1": "Üzenetek",  
    "locale-2": "Mitteilungen",  
    …,  
    "locale-N": "Messaggi",  
}  

 or  

 "Messages"  

Fields

_stringThe translation of the text in the default locale. This translation will be used if no other translation is provided that matches the language preferences of the driver.
localestring (optional)The translation of the text in the given locale. Locale can be any IETF BCP 47 or ISO 639 language tag.

If multiple translations are provided, the app will choose the translation that corresponds to the preferred language set by the driver on the mobile device. If multiple languages match the preferred languages, the driver’s most preferred locale will be picked. If no translations match the driver's preferred language, the translation in the default locale will be picked. The translation in the default locale is required.

If internationalization is not necessary, it is also possible to provide the translation in the default locale using the following shorthand syntax:

{  
    "ost18Text": "Messages",  
    …  
}  

The above syntax is equivalent with the following expanded form

{  
    "ost18Text": {  
        "_": "Messages"  
    },  
    …  
}  

Icon (Kico)

Specifies an icon from the Google Material Icons library.

"Library.Style.Icon"  

Fields

LibrarystringThe name of the icon library containing the icon. Presently only Material is supported.
StylestringThe style of the icon. Possible values: Outlined, Filled, Rounded, Sharp, TwoTone.
IconstringThe pascal-case name of the icon as specified by the Google Material Icons library.

Color

Specifies a color and transparency using the IEC 61966-2.1:1999 SRGB color space.

"AARRGGBB"  

Fields

AAhex2 hexadecimal digits specifying the alpha color channel (opacity).
RRhex2 hexadecimal digits specifying the red color channel.
GGhex2 hexadecimal digits specifying the green color channel.
BBhex2 hexadecimal digits specifying the blue color channel.

Corner radius (Krund)

Specifies the corner radius of a widget.

    {"k": "fixed", "dp": 4.5}

    // or 

    {"k": "relative", "percent": 50} 

    // or 

    {"k": "unit", "u": 0.1}  

Fields

kstringMeasurement unit type. Must be fixed, relative or percent.
dpnumberCorner radius in Android Device Independent Pixels. See also: android: Dp
percentintegerCorner radius given as a percentage of widget size. 50% means a circular shape.
unumberCorner radius given in layout coordinate units

Custom notification (Notd)

Defines a customizable notification and/or badge to be shown to the user of the app when the screen is updated on the mobile device.

A notification is shown with the text defined in the ost18Message field, if the field is present. A badge is displayed on the button with the number specified in the ocBadge field, if the field is present. If another notification/badge having the same notid value is already being displayed, their text/value is updated by this notification.

Pressing the button or the notification will perform the usual action as defined in the buta field of the mbut structure and discard the notification/badge. Once the user marked a notification/badge as read, future notifications with the same notid will not be displayed.

{  

    "notid": "2023/03/23",  
    "ost18Message": {  
        "_": "You have received new data",  
        "hu": "Önnek új adata érkezett."  
    },  

    "ocBadge": 1  
}  

Fields

notidstringClient-generated unique identifier of the notification. Must be unique within the entire scren.
ost18Messagest18 (optional)The internationalized text of the notification message. If omitted, a notification will not be shown.

ocBadge

integer (optional)

The number that should be displayed by the badge on the button. If omitted, no badge will be displayed.

© 2025 instantCMR LtdAPI Legal Disclaimer