51degrees java online with Winfy
We have hosted the application 51degrees java in order to run this application in our online workstations with Wine or directly.
Quick description about 51degrees java:
Add mobile device detection to Java the easy way with 51Degrees.com. No cloud services, no external plug-ins, all Mozilla Public Licence source code. It's a great alternative to WURFL or DeviceAtlas.Also available on Maven.
1) Download the zip and extract.
2) Add the core JAR located in the "dist" directory to your java project.
3) Import the following packages:
import fiftyone.mobile.detection.Match;
import fiftyone.mobile.detection.Provider;
import fiftyone.mobile.detection.factories.StreamFactory;
4) Use the following code to start detecting devices:
//The Lite data file is provided with every archive.
Provider p = new Provider(StreamFactory.create("path/to/data/file"));
Match match = p.match("USERAGENT_STRING");
boolean isMobile = match.getValues("IsMobile").toBool();
if(isMobile)
System.out.println("Mobile");
else
System.out.println("Not mobile");
Audience: Information Technology, Telecommunications Industry, Developers, Architects.
Programming Language: Java.
.
©2024. Winfy. All Rights Reserved.
By OD Group OU – Registry code: 1609791 -VAT number: EE102345621.