treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Mobile device recognition

  • Hi,

    I was wondering what you folks use for device detection?
    I started to play with DeviceAtlas (of dev.mobi) but, and I don't know if its my code, I can't get my module to work on all platforms.

    Has anyone any other experience they can share? The key features I would like would be:
    [list]
    [*] being able to distinguish between a smart phone and a dumb phone.[/*:m]
    [*] detect a bot/spider[/*:m]
    [*] possible be able to give screen sizes[/*:m][/list:u]

    Any help would be appreciated,
    Ad
  • I don't have much experience with that you - I think it would be a great subject for a screencast Chris - , but I think you can give screen sizes with javascript and you can find bots with php. I did a little Googling and here are the results:

    Screen size javascript: http://javascript.internet.com/user-details/screen-size.html

    PHP: http://www.nes-emulator.com/x_bot.php
  • thanks edwin,

    Using other scripts could be a good call. To be honest I haven't explored that route, though I really should of! So thanks again!

    This forum is so solid, great source of minds! Now just the device recognition!
  • I recommend mobile Web Design by Cameron Moll, it covers every aspect of mobile web design including a really comprehensive section on targeting a wide variety of mobile devices. I don't normally recommend books because most information is available on the net - but I think this book is more comprehensive than anything I've found on the internet when it comes to mobile web design... so I suppose its well named ;)
  • Thanks box, its a good read!!

    SO I thoguht I would post where I have got to in this quest . . . not that far really BUT http://www.andymoore.info/php-to-detect-mobile-phones/ is a really simple option. Its a small PHP file and works a treat.
    Using this and the link Edwin pulled up, it gives a nice lightweight option.