shenoudab / active_device Goto Github PK
View Code? Open in Web Editor NEWMobile Device Detector
Home Page: mobithought.com
License: MIT License
Mobile Device Detector
Home Page: mobithought.com
License: MIT License
Palm Pre user agent (http://user-agent-string.info/list-of-ua/browser-detail?browser=Palm%20Pre%20web%20browser) seems to go unnoticed as a mobile device.
I guess you're checking for "/Palm/", but checking for "/Pre/" would recognize Palm Pre devices.
I get undefined local variable or method `device_brand' after including ActiveDevise. The is_mobile_browser? method works, but the helpers to give the device brand and model don't work.
This is the simulator page http://www.opera.com/mini/demo/
It's sending the user agent string "Opera/9.80 (J2ME/MIDP; Opera Mini/5.0.16875/958; U; en) Presto/2.4.15"
Considering it includes "Opera Mini", "Presto" and "J2ME" this seems like it should be considered mobile?
This needs to support iPad.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0
calling agent_name with a browser with this URL returns Safari when it is Chrome
On my mobile device I'm using JavaScript to fetch some data from a backend server.
The JSON request's format is :json (a.k.a "application/json"). But your :set_mobile_format before_filter ignores this and sets the format to :mobile (a.k.a. "text/html").
This causes a 406 Not Acceptable error in the controller response, when a JSON request comes in with format "JSON" (a.k.a "application/json") but the response comes in format "text/html".
respond_to do |format|
format.json do
# never gets called because format is set to :mobile by set_mobile_format filter
end
end
Any way to add additional skip_before_filter test?
Or maybe only apply your test if the incoming request format is :html
Or let me specify a list of formats for which the set_mobile_format method should be called.
I've checked http://github.com/shenoudab/active_device/blob/master/lib/active_device/os.rb but I can't see any Android OS detection values. Is Android OS detection supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.