Sha256: 2ca282d250fda352997dc218f716ab8b5fd941b94ab44278b35f72d97fa7f890

Contents?: true

Size: 1.51 KB

Versions: 3

Compression:

Stored size: 1.51 KB

Contents

= is_it_mobile
* http://rubyforge.org/projects/contentfree/

== DESCRIPTION:

Simply determines if a user agent is for a mobile device.

Comes ready with a module for Rails 2.0 to enable multiviews (respond_to with a custom mimetype) for mobile devices (see Synopsis).


== FEATURES/PROBLEMS:

* Fast & Lightweight (doesn't use anything like WURFL, which would be overkill for a quick check)


== SYNOPSIS:

The lightweight tests used in IsItMobile are almost completely based on the work of Andy Moore in an 
article at http://www.andymoore.info/php-to-detect-mobile-phones/. I added a couple more
user agents to the mix and obviously Rubified it.

It recognizes 99% of the mobile user agents from http://www.zytrax.com/tech/web/mobile_ids.html
It has nearly no false positives using the user agents from http://www.zytrax.com/tech/web/browser_ids.htm
The ones that don't quite pass are very rare (and some are even questionable appearing in their respective lists)


== INSTALL:

sudo gem install contentfree-is_it_mobile --source http://gems.github.com


== USAGE:

With Rails 2.0, simply add this to config/environment.rb:
  config.gem 'contentfree-is_it_mobile', :lib => 'is_it_mobile/rails', :source => "http://gems.github.com"

Then, just create your views using suffixes of mobile.erb instead of html.erb

You can also just use IsItMobile directly:
IsItMobile.mobile?( 'NokiaN90-1/3.0545.5.1 Series60/2.8 Profile/MIDP-2.0 Configuration/CLDC-1.1' ) # => true


== REQUIREMENTS:

If using Rails, version must be >= 2.0 for multiview capability

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
contentfree-is_it_mobile-1.2.0 README
contentfree-is_it_mobile-1.3.0 README
contentfree-is_it_mobile-1.3.1 README