Kendo-ui-core: Android 9 not detected as Android OS by kendo.support.mobileOS.android

Created on 5 Jul 2018  路  5Comments  路  Source: telerik/kendo-ui-core

Bug report

Currently Android 9, which is still not officially released, is reported as Android 9 in user agent strings, e.g.
Mozilla/5.0 (Linux; Android 9; Pixel Build/PPP3.180510.008) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36
Thus, kendo.support.mobileOS.android does not detect is as Android.

NOTE: If the version in the UAS is Android 9.0, instead of just Android 9, then it is properly recognized as Android. Most probably when Android 9 becomes official, it will become Android 9.0, so this issue should be tested once Android 9 is officially released.

Reproduction of the problem

  1. Create a custom mobile device in Chrome emulation tool with the user agent string above.
  2. Select this custom device in Chrome and load the following Dojo snippet

Current behavior

The device OS is not recognized as Android.

Expected/desired behavior

The device OS is recognized as Android and android appears in alert.

Environment

  • Kendo UI version: 2018.2.620
  • Browser: [Chrome 67 on Android 9]
Bug jQuery2

Most helpful comment

In order to fix the issue on Kendo UI Core you can change the regex that identifies the mobile OS from Kendo UI Core (kendo.core.js) from:
android: /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/ with:
android: /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)((\.)(\d+(\.\d+)?)|(?!\.))/ in order to identify Android 9 versions as it should.

All 5 comments

What's the status of this? Is there a workaround until it's fixed?

Hello, we have the same problem when running Kendo UI Core with Android 9 Pixel. The device OS is not recognized as an Android device thus our application is broken.

Would be nice to have an official answer from Kendo UI Core team for this issue and a possible fix. Thanks.

In order to fix the issue on Kendo UI Core you can change the regex that identifies the mobile OS from Kendo UI Core (kendo.core.js) from:
android: /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/ with:
android: /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)((\.)(\d+(\.\d+)?)|(?!\.))/ in order to identify Android 9 versions as it should.

Is there any hope of Telerik incorporating this simple fix so I don't have to remember to go into their source code every time I need to get a new version?

Was this page helpful?
0 / 5 - 0 ratings