angular-adaptive / adaptive-detection

This module allows you to detect iOS, Android and Windows Phone devices using user agent string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement : adding flags for more mobile types

carlinyuen opened this issue · comments

Hello @carlinyuen
What mobile types do you need to add? Windows, Blackberry, ... ?

If you need just a mobile detection I would suggest to use Wurfl.js.

Oh I was just suggesting that since you already have this nice structure set out, it'd be nice to make it more general so it's not just iOS and Android. Could add Windows, not sure if Blackberry matters much anymore haha, general mobile detector, etc. Was thinking this could be the all-in-one angular library that handles all the user agent stuff perhaps? Just throwing out ideas here.

Based on the @carlinyuen suggestion, you can use the http://detectmobilebrowsers.com hyper regex to do a simple "isMobile" or "isDesktop"

a simple gist of the function can be found here: https://gist.github.com/bf4f2d59747651b45b4f