Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    detecting browser and platform

    Dear Isomorphic,

    In an other thread, you have said this:

    Originally posted by Isomorphic
    6. How exactly is detection done of devices - desktop, iPhone, iPad, Android? Is there an API to access the detect device type?
    Yes, however the range of devices changes so fast that we plan to allow you to override the built-in detection, and we will have a forum thread you can subscribe to that shows the code used to detect browsers, which we will update as new devices come out.
    Is there such a thread?

    Currently, we am manually detecting loads of different platform and browser versions, and have to keep all kinds of tabs of various features that either work or do not work on a given browser version. It would be great if you could off-load some of this stuff.

    Specifically, I would like to query the following information:
    - What browser are we running in? (Should be an enum, something like FF35, FF36, FF40, ..., EI6, IE7, ... IPAD, IPAD2, IPHONE_ORIGINAL, IPHONE_3G, ..., MOBILE_SAFARI_5, ... STOCK_ANDROID_BROWSER_2.2, ... etc.)
    - Do we have a working native canvas?
    - Do we have CSS rounded corners?
    - Do we have CSS background transparency?
    - Do we have CSS linear gradients?
    - Do we have CSS radial gradients?

    Are there any APIs to answer these questions?

    Thank you for your help:

    Csillag
    Last edited by csillag; 13 Jul 2011, 04:22.

    #2
    We have no plans to maintain a list of low-level features that work on various devices. There are many websites already in existence dedicated to this.

    Comment


      #3
      Yes, the information is available on the internet, somewhere, but to use it, we need it in the software.

      Obviously, we could just collect all the data ourselves (I am doing this now, and this works), but since this data is changing fast, and you already need to track it (to make your widgets work optimally), it would be easier if you could make it available.

      But whatever.

      * * *

      How about simple detection of browser/platform? You already have it in place, right? How can we access it? (There is SC.isIE(), and what else?)

      Thank you for your help:

      Csillag

      Comment


        #4
        SmartGWT is a framework designed so that you never need to use such flags. You're definitely looking in the wrong place for this kind of information.

        The idea of a thread that tracks devices and their screen size (hence tablet vs handset/phone form factor) is completely different in scope and intent from a database of browser capabilities, bugs against them, etc. Again, such databases exist - use those.
        Last edited by Isomorphic; 13 Jul 2011, 09:52.

        Comment

        Working...
        X