Skip to content

A lightweight Java library for detecting mobile devices.

Notifications You must be signed in to change notification settings

seththeriault/mobile-detect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mobile-detect

A lightweight Java library for detecting mobile devices.

Based on MobileESP, the code has been moved to github and made available via Maven Central.

Usage

Add this to your maven project

<dependency>
  <groupId>au.com.flyingkite</groupId>
  <artifactId>mobiledetect</artifactId>
  <version>1.1.1</version>
</dependency>

Then call the library like so:

// setup the class with the user agent
UAgentInfo agentInfo = new UAgentInfo(userAgent, null);
    
// check if mobile device
boolean isMobileDevice = agentInfo.detectMobileQuick();
    
//or perhaps check if it is a tablet
boolean isTabletDevice = agentInfo.detectTierTablet();

About

A lightweight Java library for detecting mobile devices.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Java 100.0%