Various examples are included in all Enterprise API packages to clearly demonstrate the API features, usage and some use cases. These examples are very simple and are heavily commented.
Includes six examples. Three simple command line examples which use DeviceApi to detect and get properties from header sets and client-side component. These examples show how the headers and client-side components help getting precise property values from Opera mini browsers and iPhone devices. Three simple web examples to be used in a servlet container. These examples use the DeviceAtlasWeb and the request object to automatically detect and get the properties for the request. Using custom API configs and the client-side-component is shown in these web examples.
This web example uses the DeviceApiWeb to get properties for the current request and then uses some basic property values to decide which website provides the most suitable content for the device making the request.
This web example uses the DeviceApiWeb to get properties for the device making the current request and then uses some basic property values to choose a suitable template to wrap around the content.
This web example uses the DeviceApi to get properties for user-agents from a given list. Some properties such as vendor, browser name and device type are aggregated and the results are displayed as graphs and numbers.
This example uses the DeviceApiWeb to detect the device and use some of its properties to show certain advertisements and download links which may be related or of interest to the user, considering his/her device. This is a web example.
Note that in the web examples which use the DeviceApiWeb, the client side properties are taken into account automatically by the API if the cookie exists on the browser. This means if the cookie already exists within your browser you will still see the client side properties in a getProperties call which has not included the DeviceAtlas client side component. You can delete the cookie manually to see the differences between the results from examples which use the client side component and those that don't.