Unfortunately You don't miss only 0.01% but around 30%. (Blackberry does not contain blackberry at all, Same for Nokia). An iPhone is really different from Nokia N95 or a BlackBerry or Motorola v3xx So you need more detail about phone to supply a good user experience. The screen size is a first class needed.
The best approach is to detect if the connected device is mobile or not with a very simple algorithm. If it is mobile, process user-agent with a set of heuristics to classify the phone or to get more info about it. On Sep 27, 5:47 pm, Eli Jones <[email protected]> wrote: > I really can't believe that.. this message: > > "Need a quick and easy way to detect mobile phones from my app, that won't > add too much performance overhead." > > Led to potential solutions that effectively contain phrases like: > > "Levenstein distance", "huge XML", "rewrite WURFL" > > Someone already mentioned.. look for "iphone", "android" and "blackberry" to > get a large chunk of the Mobile users without needing to check any stored > data for clues.. if you get a useragent that does not contain "MSIE" (or > whatever you like) or "Firefox" or whatever list of desktop browser classes > you know of.. > > Then check memcache to see if that useragent is mobile.. if memcache > contains no data, check your processed datastore data to see if the > useragent is mobile (according whatever process you've decided to use to > determine this) and stick that data back in memcache for next time. > > Or, just google "mobile useragent" > > And look at a page like this for more obvious useragent strings: > > http://www.zytrax.com/tech/web/mobile_ids.html > > <http://www.zytrax.com/tech/web/mobile_ids.html>OR, just be lazy and assume > anyone with a useragent string that doesn't contain "MSIE", "Firefox", > "Chrome" (that might be tricky... since maybe mobile devices could have > it??), "Opera" (with some special checks for mobile version) is on mobile.. > I guess you can put in checks for all the Linux browsers too.. > > Some asperger nerd will surely come in and say that you'll miss some 0.01 % > of mobile users with some method like the above.. and while you are spending > all your time trying to figure out the ideal mobile detection scheme.. some > thicknecked dude will come along and do the quick and dirty 90% method > (while playing mobile sudoku, and Madden 2012 at the same time).. and beat > you to market. > > (Naturally, I'm using hyperbole to make a point.. [I think]) > > > > On Sun, Aug 22, 2010 at 2:12 AM, prgmratlarge <[email protected]> wrote: > > Need a quick and easy way to detect mobile phones from my app, that > > won't add too much performance overhead. Any suggestions? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-appengine%2Bunsubscrib > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
