Detect iOS Android devices
Closed this issue · 1 comments
xuwupeng2000 commented
How to detect iOS devices (iPhone, Tablets) and Andorid devices ?
Thank you
xuwupeng2000 commented
user_agent = request.env['HTTP_USER_AGENT']
client = DeviceDetector.new(user_agent)
case client.os_name
when 'iOS'
render :ios
when 'Android'
render :android
else
render :other
end