0

I have developed an application by Sencha touch ,it works properly,but in Chrome OS it loads phone view instead of table one ,what should I do?

Eduard Florinescu
  • 16,747
  • 28
  • 113
  • 179
user1892542
  • 481
  • 1
  • 4
  • 4

1 Answers1

0

I came across the same thing. Unfortunately Chrome OS's user agent isn't recognised by Sencha Touch as a tablet. But you can change the isActive function in your Tablet.js profile to recognise Chrome by it's UserAgent.

Hope this bit of code helps:

Tablet.js:

isActive : function() {
    return Ext.os.is.Tablet || Ext.browser.userAgent.indexOf('CrOS') != -1;
}

This returns true if sencha recognises the browser to come from a Tablet or if the UserAgent contains the text "CrOS" (which Chrome OS does).

ugoano
  • 118
  • 1
  • 5