• About Us
  • Blog
  • Basket
  • Account
  • Sign In

Java V3.1 Documentation

You are viewing an old version of the documentation. For the latest, please go here: Java V3.2

Lite Data Files

As of version 3.2 of the API, the Lite data files are no longer embedded into the JAR itself, making it easier to update them manually. Lite data detects only the essential information about the device connecting to the website e.g. whether it is mobile or not, the screen resolution and 40 browser properties. Lite data files are released every month and can manually be downloaded from Github.

Premium Device Data

Important web sites should consider switching from Lite data to Premium data. Premium data works with all the same source code as Lite, but provides 2 important extra features.

More Properties   Automated Weekly Data Updates
If you require more information about the device connecting to your site then the premium data set will be able to provide a more detailed description, such as the hardware model, operating system, and browser details. For a full list of properties please see our Property Dictionary.   A further advantage of using Premium and Enterprise data is the rate at which the data is refreshed and improved. The Lite data is updated every month but does not include devices that have been released in the previous three months. In contrast, the Premium data is updated weekly and includes data to detect the latest devices.

To compare our products please visit Compare Device Data page

Licence Keys

When you purchase Premium Data you will be receive a licence key. Download Premium binary format data for use with the Java APIs. Follow these instructions for Core or WebApp packages dependent on your implementation.

Automatic Updates

Automatic updates can be enabled in both the Core and Webapp packages. In both instances a check is performed every 6 hours for new device data once the current data becomes more than 6 days old. These figures can be changed from the Constants class in the Core package (numbers shown are milliseconds):

     * The length of time to wait before checking for a newer version of the
     * device data file.
    public static final long AUTO_UPDATE_WAIT = 518400000;
     * The length of time to sleep before checking for new device data again.
    public static final long AUT0_UPDATE_SLEEP = 21600000; 

Important Note For Version 2 Or Version 3 Memory Mode

The update process is relatively memory intensive. We recommend your web server's Java Virtual Machine has at least 512mb allocated to it or you may receive OutOfMemoryErrors.

Update attempts, downloads and errors (such as rejected licence keys) are logged to std err by default. The Detector uses SLF4J logging, so logging can be changed with minimal modification. See the SLF4J website for more details.