Skip to main content

Configuration Data

Information about how the application looks, the layout it uses, and it's overall functionality is saved in one main configuration file, BT_config.txt. This is a plain text file organized in JSON format. This file can be edited using the Control Panel or it can be edited manually with any text editor.

Configuration Data Location

The main configuration data file is part of the Xcode or Android Studio project. Most applications also use a configuration file that resides on a remote server. This approach allows the application to dynamically update itself when content changes occur on the remote server. The remote server is usually the Control Panel but could also be your own website or other online document storage solution such as DropBox™

How Configuration Data is Processed

Here are the basics steps the mobile app works through when reading it's configuration data.

  1. App launches.
  2. App looks for a cached copy of it's configuration data in it's local data storage. This is different than the copy in the Xcode or Android Studio project (see #5).
  3. If a copy of the BT_config.txt file is found in the apps local data storage it reads that file and ignores the file included in the Xcode or Android project. This means the app downloaded and saved data from a remote configuration file.
  4. If a copy of the BT_config.txt file is not found in the apps local data storage it reads the file included in the Xcode or Android Studio project. If this file includes a URL that points to a remote server, it downloads the file then saves it for future use (see #1). In this case, the file included in the Xcode or Android Studio project is not used again unless the app's cached-data is removed from the device.
  5. If no URL is provided for a remote server, the app uses the BT_config.txt file in the Xcode or Android Studio project every-time and does not attempt to download anything from the internet.

Configuration Data Properties

Configuration data is plain text in global theme.

BT_config.txt Sections
BT_config"BT_config":{}
This object wraps the entire JSON structure and all other objects.
BT_items"BT_items":[]
An array with one and only one BT_item, this item is of type BT_app. The BT_app item holds all the configuration data for the app.
BT_app Properties
Item Id"itemId":"a unique id"
A unique id identifiying this item from all other items in the entire JSON structure.
Item Type"itemType":"BT_app"
Identifies this type of item as a BT_app item.
buzztouch App Id"buzztouchAppId":"88473748399284"
The unique id identifying this buzztouch app. Ignored if the app is not connected to the Buzztouch control panel.
buzztouch API Key"buzztouchAPIKey":"995839483828"
The API key identifying this Buzztouch app. Ignored if the app is not connected to the Buzztouch control panel.
Configuration Data URL"dataURL":"an internet address"
An internet address leading to the app's remote configuration file. This is normally a URL leading to the configuration data controlled by the Buzztouch control panel. It could also lead to a configuration file saved on your website or online document storage folder. BT_config.txt in the Xcode or Android Studio project is used if this is not provided. This URL works closely with the reportToCloudURL.
Report To Cloud URL"reportToCloudURL":"an internet address"
An internet address leading to a remote-script that determines if the app's content or layout needs updated. This is optional if a dataURL is not provided. This is required if a dataURL is provided. See more about the Report to Cloud URL.
Name"name":"My Cool App"
The name of the app in the Buzztouch control panel.
Version"version":"1.5"
The Buzztouch version.
Start Location Updates"startLocationUpdates":"1"
Options: 0 or 1. 0 means "do not turn on the GPS when the app launches.
Allow Rotation"allowRotation":"allDevices"
Options: allDevices, largeDevicesOnly. Setting this to largeDevicesOnly will prevent small devices from switching to landscape view when the device is rotated.
Themes object.
Tabs object for it's home screen.
Screens"BT_screens":[]
An array containing from 1 to X Screen or Menu objects. Each object in this list represents a screen or feature found in the app.

* Required

note

If you have disconnected the application from the control panel, meaning you removed the Configuration Data URL, changes to the control panel will not be reflected in the app.