Hybrid View

  1. #1
    Sencha User kitesurf's Avatar
    Join Date
    Jan 2012
    Location
    London, England
    Posts
    72
    Vote Rating
    2
    kitesurf is on a distinguished road

      0  

    Default Webkit Browser Detection

    Webkit Browser Detection


    I am using Sencha Architect to develop my Sencha Touch App. Architect creates an app.html file which contains a bit of Javascript to check if the browser is webkit capable:
    Code:
        <script type="text/javascript">
             if (!Ext.browser.is.WebKit) {
                 alert("The current browser is unsupported.\n\nSupported browsers:\n" +
                     "Google Chrome\n" +
                     "Apple Safari\n" +
                     "Mobile Safari (iOS)\n" +
                     "Android Browser\n" +
                     "BlackBerry Browser"
                 );
             }
         </script>
    However, when I use the Sencha SDK tools to build my app for production
    Code:
    sencha app build production
    the landing page, index.html contains the Microloader which is responsible for loading the app, checking for delta updates, loading the Sencha framework and probably many other things, but does not contain any webkit browser checking.

    How could I implement this kind of checking to make sure the user is using a Webkit browser? Since we're not directly loading the Sencha framework, I can't use the above browser checking code. I guess when then code snippet is run, Sencha hasn't loaded yet, hence why I get an 'undefined' javascript error.

    Any ideas?

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    HI!

    i guess you are using touch 1.x versions.
    in 2.x, your code is working fine.
    check this:-http://docs.sencha.com/touch/2-0/#!/guide/environment_package


    if you are using 1.x, in that case, try the below solution:-
    http://www.sencha.com/forum/showthre...s-sencha-touch
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User kitesurf's Avatar
    Join Date
    Jan 2012
    Location
    London, England
    Posts
    72
    Vote Rating
    2
    kitesurf is on a distinguished road

      0  

    Default


    Thanks sword-it!

    Instead of putting it in an html file, I put the webkit check in the Sencha app.js launch() function. Works perfectly.

    thanks

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi