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");

Project Samples

Project Activity

See All Activity >

Follow 51Degrees-Java

51Degrees-Java Web Site

Other Useful Business Software

Find out what (or who) is slowing down your network Icon
Find out what (or who) is slowing down your network Icon

Get comprehensive network bandwidth analysis and performance monitoring with SolarWinds® Bandwidth Analyzer Pack.

Network slow, but you don't know the cause? Use Bandwidth Analyzer Pack (BAP) to monitor and analyze network bandwidth performance and traffic patterns. With BAP, you can identify which users, applications, and protocols are consuming the most bandwidth. You can also monitor Wireless LAN Controller traffic to see what applications and clients are using your wireless network. Try it free for 30 days!

Rate This Project

Login To Rate This Project

User Ratings

★★★★★
★★★★
★★★
★★
0
0
0
0
1
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5

User Reviews

There are no 3 star reviews.

Additional Project Details

Intended Audience

Information Technology, Telecommunications Industry, Developers, Architects

Programming Language

Java

Registered

2012-08-08