- Getting Started
- Web Applications
- Offline Application
- Image Optimiser
- Automatic Data Updates
- Client Side Overrides
- User Performance Monitoring
- Passing Properties To Client Side
- Accessing Metadata
- Match Metrics
- Trie Matching
Core Data Update - Version 3
Version 3 of the Java API utilises static methods to update data. The following code demonstrates this:
The update method must be supplied with a valid license key from 51Degrees and a file path to write the data. If the given path already has a data file then the updater will only request data that is newer.
The update may fail if the license key is invalid, the given path is not writable or if the update service cannot be reached (i.e, firewall is blocking the request). The reason for a failure can be seen in the AutoUpdateException that is thrown.
Note that this method does not update any existing dataset or provider objects, they'll need to be rebuilt.
Enable Automatic Updates in the Core Package - Version 2
In the getting started section, you create a Provider using the Reader class. To update data automatically, we will instead use the Factory class. This class creates Providers and is responsible for keeping them up to date.
The Factory class must be given a file path and licence key to get updates: