Follow these simple steps to have the DeviceAtlas Enterprise API working locally within a few minutes.
If you do not have a licence, please contact us to request an evaluation.
1. Download Device Data File
For the Enterprise solution, device data is packaged in a JSON format, which is highly compressed to reduce server footprint, and is optimized for speed of search and retrieval. It can either be downloaded manually or fetched with an automated script.
Refer to our Device Data (JSON) reference documentation to know more about DeviceAtlas data downloads.
2. Device Identification API
DeviceApi deviceApi = new DeviceApi(); deviceApi.loadDataFromFile("/path/to/DeviceAtlas.json");
Map<String, String> headers = new HashMap<String, String>(); headers.put("HEADER NAME", "HEADER VALUE"); Properties properties = deviceApi.getProperties(headers);
String userAgent = "THE USER AGENT VALUE"; Properties properties = deviceApi.getProperties(userAgent);
boolean mobileDevice = properties.contains("mobileDevice", true); int displayWidth = properties.containsKey("displayWidth")? properties.get("displayWidth").asInteger(): 100; String vendor = properties.containsKey("vendor")? properties.get("vendor").asString(): ""; boolean useBiggerIcons = properties.contains("touchScreen", true);
You can find all information related to the Java DeviceAtlas Enterprise API here.
3. Data File Options
4. Client-side Component
The Client-side Component is needed for granular identification of iOS devices, as well as for other dynamic properties. Please visit DeviceAtlas Client-side Component.