51Degrees.mobi-Java Icon

51Degrees.mobi-Java

Mobile Device Detection for Java - 4 Step Setup - 3 minutes

7 Recommendations
15 Downloads (This Week)
Last Update:
Download 51degrees.mobi_Detection_Java_2.2.8.4.zip
Browse All Files

Screenshots

Description

Add mobile device detection to Java the easy way with 51Degrees.mobi. No cloud services, no external plug-ins, all Mozilla Public Licence source code. It's a great alternative to WURFL or DeviceAtlas.

(NOTE: Also available as a dependency through the maven central repository.)

1) Download the zip file and extract.
2) Add the core JAR file located in the "dist" directory to your java project.
3) Import the following packages:

import fiftyone.mobile.detection.*;
import fiftyone.mobile.detection.binary.*;

4) Use the following code to start detecting devices:

Provider p = Reader.create();

BaseDeviceInfo b = p.getDeviceInfo("<INSERT_USERAGENT_HERE>");

String result = b.getFirstPropertyValue("IsMobile");

if (result.equals("True")) {

System.out.println("This Is Mobile");
}

if (result.equals("False")) {
System.out.println("This Isn't Mobile");
}

p.destroy();

51Degrees.mobi-Java Web Site

Update Notifications





User Ratings

 
 
7
2
Write a Review

User Reviews

  • Posted by Joe Davine 2013-01-14

    Quick and easy to use!

  • Posted by Lukas 2012-12-18

    no trouble to install and run, works nicely.

  • Posted by James 2012-11-02

    fiftyone-java is fast and stable

Read more reviews

Additional Project Details

Intended Audience

Developers, Information Technology, Architects, Telecommunications Industry

Programming Language

Java

Registered

2012-08-08

Icons must be PNG, GIF, or JPEG and less than 1 MiB in size. They will be displayed as 48x48 images.