Global View (app.xml) (deprecated)
app.xml
is considered deprecated
Support for app.xml
may be dropped in future versions of the JourneyApps Runtime. Please upgrade your app to use the Navigation Drawer to ensure that your app remains compatible with the JourneyApps Runtime.
The current implementation allows overriding the default Messages menu item in the hamburger sidemenu, adding arbitrary other menu items, and customizing the app badge counter. The feature requires the "Call JS functions from XML" feature flag.
Open the mobile/app.xml
file via the command palette in OXIDE. Please note that new apps are no longer created with an app.xml
file.
The format can be seen in the following example.
When push notifications are enabled for an app (ie. there exists a model with notify-user
tag), the default Messages menu item appears in the side menu. This menu item can be hidden by adding one or more items of type="messages"
in the menu section of app.xml
. The referenced functions in the on-press
and indicator
should be defined in the SharedJS (these are executed in the context of the current view state).
The on-press
functions are standard and can perform navigation as you would expect - perhaps to a custom messages view. The menu items indicator
functions should always return an integer (any greater than zero is displayed in brackets alongside the label) and are executed after sync completes or errors (exactly like the current Push Notification "messages" count).
Similarly, the notifications
indicator
function is executed after the notify-user
(push notification) objects are processed for the received-field
, and updates the external app badge. Notice that this is useful when you have more than one model generating push notifications: eg. new job assignments and approval workflow for quotes. Note that these count functions should be very lean and fast.
Replacing the hamburger menu logo image with your own
Version compatibility
The ability to replace the hamburger menu logo image with your own was introduced in version 4.25.3 of the JourneyApps Container.
The <menu>
item now supports a <logo>
child:
where images/my-transparent-png.png
is an image uploaded via the Assets panel on OXIDE. (Similarly to what you would use for display-image
)
Example:
Notes about the logo:
Only
.png
files supportedWe recommend a transparent background
Last updated