Reputation: 323
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
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