Documentation/Device setup

For administrators

Remote settings

Parameters in preferences.xml and how to apply them to Android devices through an exchange.

preferences.xml lets you change Android application settings through an exchange. The integrator prepares the file and places it in outbox. The application downloads and applies the settings when the corresponding profile runs.

File structure

The root element is <preferences>. It contains settings sections, each with parameters and their values.

<?xml version="1.0" encoding="utf-8"?>
<preferences>
  <global>
    <theme>light</theme>
  </global>
  <references>
    <back-hierarchy-up>true</back-hierarchy-up>
  </references>
  <document-order>
    <set-custom-price>false</set-custom-price>
    <forbid-edit-sent-document>true</forbid-edit-sent-document>
  </document-order>
</preferences>

Include only the parameters you want to change. All other settings keep their current values. Use true or false for boolean parameters. The file's actual encoding must match the encoding value in the XML declaration.

How to transfer settings

  1. Place preferences.xml directly in the outbox directory configured for the device.
  2. Make sure exchange.xml contains a profile that downloads this file. In the standard exchange file, it is Завантажити налаштування (Download settings).
  3. If you changed exchange.xml, first run Download exchange file on the device.
  4. Run the Завантажити налаштування (Download settings) profile, or the name specified in its view attribute, and check the exchange log on the device.
  5. Open the relevant application settings and check the imported values. Restart the application to see a theme change.

Example profile to add inside <palm-client> in exchange.xml:

<exchange name="preferences" view="Download settings">
  <get>
    <files>
      <file name="preferences" files="preferences.xml"/>
    </files>
  </get>
</exchange>

The standard exchange.xml sets deleteOnServer="true" for this file: after successful installation, the application asks the server to delete it. If several devices must receive settings from a shared outbox, remove this attribute or set deleteOnServer="false". Once all intended devices have received the file, the integrator can remove it from outbox.

General settings — global

ParameterValuesPurpose
themedark, lightDark or light application theme.
table-font-sizesmall, normal, large, extra-largeFont size in tables.
debug-modetrue, falseDebug mode for diagnostics.

Reference lists — references

ParameterValuesPurpose
back-hierarchy-uptrue, falseThe Back button first moves to the parent group instead of closing the reference list.
show-parents-in-detailstrue, falseShows parent groups in product details.
recursive-filtertrue, falseHides groups with no matching items when filtering.
view-type0, 1, 2Product reference view: 0 — table, 1 — tiles, 2 — gallery.

Orders — document-order

All parameters in this section accept true or false.

ParameterWhat true enables
calculate-restRecalculation of the stock balance to account for the quantity in the order.
set-custom-priceChanging a product's price during product selection.
products-in-packageEntering quantities in packages.
customer-own-prices-onlySelecting only the price category assigned to the customer.
forbid-new-document-with-expired-debtProhibiting new orders for customers with overdue debt.
check-photoRequiring a photo before selecting products for an order if the customer's photo_required flag is set.
forbid-edit-sent-documentProhibiting edits to sent orders.

Payments — document-payment

All parameters in this section accept true or false.

ParameterWhat true enables
forbid-edit-savedProhibiting edits to saved payments.
forbid-delete-not-sentProhibiting deletion of payments that have not been sent.
forbid-edit-sent-documentProhibiting edits to sent payments.

Additional product selection fields — product-count-dialog-info-fields

Parameter names in this section match field names in the product reference. Set a field to true to show it in the additional information of the quantity entry dialog, or false to hide it.

<product-count-dialog-info-fields>
  <code>true</code>
  <packaging>true</packaging>
</product-count-dialog-info-fields>

Use only fields that already exist in the downloaded product reference. Place this fragment inside <preferences>.

Product images — product-reference-images

ParameterValuesPurpose
pathPathImage directory on the Android device.
extensionsExtensions separated by ;, for example jpg;jpeg;pngFile types the application uses to find product images.

path specifies a path on the device. It must match the location where images are saved during an exchange.

Server connection — palmorder-server

This section changes the address and connection parameters of an application that is already configured. For the initial connection, see Pair a device.

ParameterValuesPurpose
server-version-7-plustruePalmOrder Server 7.x mode.
httpstrue, falsetrue — connect over HTTPS, false — over HTTP. Applies to both the local and remote addresses. If omitted, the current setting is kept.
local-addressIP address or domain nameLocal exchange server address, without http://, https:// or a port.
remote-addressIP address or domain nameServer address for exchange over the internet, without a protocol or port.
portInteger from 1 to 65535Connection port.
timeout-secondsInteger greater than 0Server response timeout in seconds.
<palmorder-server>
  <server-version-7-plus>true</server-version-7-plus>
  <https>false</https>
  <local-address>192.168.1.20</local-address>
  <port>8888</port>
  <timeout-seconds>60</timeout-seconds>
</palmorder-server>

Place this fragment inside <preferences>, replacing the address and port with your own. For an HTTPS server, set <https>true</https> and the appropriate port. The pairing secret is not transferred in preferences.xml. If the device is moving to another server, pair it with that server.

GPS tracking — gps-tracking

ParameterValuesPurpose
enabledtrue, falseEnable GPS tracking.
requiredtrue, falseRequire location services to be enabled to use the application.
intervalInteger greater than 0Interval between saved location points, in seconds.
onTime in HH:mm format, for example 08:00Start of tracking hours.
offTime in HH:mm format, for example 18:00End of tracking hours.
loginTextGPS tracking account login.
passwordTextGPS tracking account password.
send-intervalInteger greater than 0Interval between location uploads, in seconds.
service-check-intervalInteger greater than 0GPS service check interval, in minutes.

If on and off are equal, tracking runs without a time-of-day restriction. Location permissions are granted separately in Android.

If settings were not applied

Start with the exchange log on the device: the application reads preferences.xml and reports the installation result.

Message or symptomWhat to check
The file was not downloadedThe filename preferences.xml, the outbox directory for the intended syncName, and whether the file is included in the exchange profile.
Unknown section or parameterThe exact spelling and whether it appears in the tables above. Unknown parameters are skipped with a warning.
Installation errorXML syntax, encoding and allowed parameter values. After an error, check the actual settings before downloading again.
Only one device received the fileWhether deleteOnServer="true" removed it from the shared outbox directory.