- Home
- Coding concepts
- Special screens
- Available features
- More
- Translation
- Testing
- Deployment
- Differences in Locify 0.8.5
- Sample services
- Example videos
Variables
There have been some changes in format for older versions of Locify.
See documentation for Locify 0.8.1 and older.
If you plan support for versions older than 0.8.5, you need to detect client version and serve correct screen.
Variables are way to input some Locify-specific data into your XHTML pages. Variables enables you to get location-based data, use service settings and couple of other things.
All variables starts with char '$'. Variables can be used in URL's everywhere and in the value of <input>
tags and in <locify:variables> tag in forms.
Location-based data
- $lat - current latitude in decimal format
- $lon - current longitude in decimal format
- $alt - current altitude in meters
- $spe - current speed in km/h
- $hea - current heading (0-360°)
- $acc - vertical accuracy of location in meters
Service settings
Service settings is normal form, but it's action url is set to
locify://serviceSettings. Values of this form are stored locally in client and you can use this settings in your
XHTML pages. This is achieved by using variable:
- $settings[variable_name] - value of given name from service settings
Client info
- $client[time] - current time in user's phone as unix timestamp
- $client[lang] - language of user's cell phone (can be different from language used in Locify - this information is available in user-agent string)
- $client[version] - version of Locify client
- $client[width] - available canvas width in pixels
- $client[height] - available canvas height in pixels
- $client[device] - MicroEdition.Platform identification of user's phone in format
Vendor/PhoneModel/Firmware_version"
User-agent
User-agent is small header sent with every request from Locify. You can find there information about Locify version and language selected in Locify. Format of user-agent string:
Locify/version/language/Additional_phone_info
Sample user-agent:
Locify/0.7.2/cs_CZ/SonyEricssonW960i/R100 Profile/MIDP-2.0 Configuration/CLDC-1.1
