On this page
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
- Place
preferences.xmldirectly in the outbox directory configured for the device. - Make sure
exchange.xmlcontains a profile that downloads this file. In the standard exchange file, it is Завантажити налаштування (Download settings). - If you changed
exchange.xml, first run Download exchange file on the device. - Run the Завантажити налаштування (Download settings) profile, or the name specified in its
viewattribute, and check the exchange log on the device. - 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
| Parameter | Values | Purpose |
|---|---|---|
theme | dark, light | Dark or light application theme. |
table-font-size | small, normal, large, extra-large | Font size in tables. |
debug-mode | true, false | Debug mode for diagnostics. |
Reference lists — references
| Parameter | Values | Purpose |
|---|---|---|
back-hierarchy-up | true, false | The Back button first moves to the parent group instead of closing the reference list. |
show-parents-in-details | true, false | Shows parent groups in product details. |
recursive-filter | true, false | Hides groups with no matching items when filtering. |
view-type | 0, 1, 2 | Product reference view: 0 — table, 1 — tiles, 2 — gallery. |
Orders — document-order
All parameters in this section accept true or false.
| Parameter | What true enables |
|---|---|
calculate-rest | Recalculation of the stock balance to account for the quantity in the order. |
set-custom-price | Changing a product's price during product selection. |
products-in-package | Entering quantities in packages. |
customer-own-prices-only | Selecting only the price category assigned to the customer. |
forbid-new-document-with-expired-debt | Prohibiting new orders for customers with overdue debt. |
check-photo | Requiring a photo before selecting products for an order if the customer's photo_required flag is set. |
forbid-edit-sent-document | Prohibiting edits to sent orders. |
Payments — document-payment
All parameters in this section accept true or false.
| Parameter | What true enables |
|---|---|
forbid-edit-saved | Prohibiting edits to saved payments. |
forbid-delete-not-sent | Prohibiting deletion of payments that have not been sent. |
forbid-edit-sent-document | Prohibiting 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
| Parameter | Values | Purpose |
|---|---|---|
path | Path | Image directory on the Android device. |
extensions | Extensions separated by ;, for example jpg;jpeg;png | File 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.
| Parameter | Values | Purpose |
|---|---|---|
server-version-7-plus | true | PalmOrder Server 7.x mode. |
https | true, false | true — connect over HTTPS, false — over HTTP. Applies to both the local and remote addresses. If omitted, the current setting is kept. |
local-address | IP address or domain name | Local exchange server address, without http://, https:// or a port. |
remote-address | IP address or domain name | Server address for exchange over the internet, without a protocol or port. |
port | Integer from 1 to 65535 | Connection port. |
timeout-seconds | Integer greater than 0 | Server 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
| Parameter | Values | Purpose |
|---|---|---|
enabled | true, false | Enable GPS tracking. |
required | true, false | Require location services to be enabled to use the application. |
interval | Integer greater than 0 | Interval between saved location points, in seconds. |
on | Time in HH:mm format, for example 08:00 | Start of tracking hours. |
off | Time in HH:mm format, for example 18:00 | End of tracking hours. |
login | Text | GPS tracking account login. |
password | Text | GPS tracking account password. |
send-interval | Integer greater than 0 | Interval between location uploads, in seconds. |
service-check-interval | Integer greater than 0 | GPS 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 symptom | What to check |
|---|---|
| The file was not downloaded | The filename preferences.xml, the outbox directory for the intended syncName, and whether the file is included in the exchange profile. |
| Unknown section or parameter | The exact spelling and whether it appears in the tables above. Unknown parameters are skipped with a warning. |
| Installation error | XML syntax, encoding and allowed parameter values. After an error, check the actual settings before downloading again. |
| Only one device received the file | Whether deleteOnServer="true" removed it from the shared outbox directory. |
