Thom
Thom

Reputation: 323

My cordova app is not working in M1 a1 mobile

Our android cordova app is working file in all phones but in Mi A1 mobiles it's not working properly , any idea ?

Upvotes: 2

Views: 325

Answers (1)

Thom
Thom

Reputation: 323

The fix is below., This may help someone.

In Mi A1 mobile the browser name will show us OPR but sencha not having the name in list so change the below code in touch\src\env\Browser.js line No : 231

Old Code

    if (userAgent.match(/OPR/)) {
        browserMatch = userAgent.match(/OPR\/(\d+.\d+)/);
        browserName = 'Opera';           
        browserVersion = new Ext.Version(browserMatch[1]);
    }

New Code

browserMatch = userAgent.match(/OPR\/(\d+.\d+)/);
    if (userAgent.match(/OPR/)) {
          if (browserMatch) {
        browserName = 'Opera';           
        browserVersion = new Ext.Version(browserMatch[1]);
        }
    }

Upvotes: 1

Related Questions