1
Chrome 123 on Android doesnt detect Mobile
Problem reported by Patrick Riehmers - 4/11/2024 at 2:14 AM
Resolved
With the newest Chrome Update v123 on Android, the DocumentViewer doesn't recognises him as a Mobile Device Browser.

Screenshot is from the Chrome USB Debugger Console from an Samsung Tablet:

8 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
FYI,
This is now fixed

Version 6.9.7 - April 18, 2024

  • Fixed: The following error in console on mobile which prevented loading of the document viewer:
    Uncaught TypeError: Cannot read properties of undefined (reading 'top')
    The error was observed with Chrome on Android and emulated mobile views in browser's developer tools.

  • Improved: Mobile device detection to better detect new browsers.

  • Improved: Updated jquery to latest 3.7.1.
    Disabled unnecessary console message "JQMIGRATE: Migrate is installed, version 3.4.1"

0
Patrick Riehmers Replied
Hi Cem,
thanks for the updates, i'm evaluating currently if this fix our problems.
Did you removed or moved the isMobile Object?
Also documentViewer.getMobileInfo() is gone?

Thanks, best wishes
Patrick
0
Cem Alacayir Replied
Employee Post
Yes they are removed, instead there is getUAParser() method.

You can use documentViewer.getUAParser().getDevice() to get result like:
{type: 'mobile', model: 'SM-G981B', vendor: 'Samsung'}
or documentViewer.getUAParser().getBrowser() to get result like:
{name: 'Mobile Chrome', version: '116.0.0.0', major: '116'}
or documentViewer.getUAParser().getResult() to get full result like:
{
    "ua": "Mozilla/5.0 (Linux; Android 13; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36",
    "browser": {
        "name": "Mobile Chrome",
        "version": "116.0.0.0",
        "major": "116"
    },
    "cpu": {},
    "device": {
        "type": "mobile",
        "model": "SM-G981B",
        "vendor": "Samsung"
    },
    "engine": {
        "name": "Blink",
        "version": "116.0.0.0"
    },
    "os": {
        "name": "Android",
        "version": "13"
    }
}
0
Patrick Riehmers Replied
Thanks a lot Cem! That's really nice and informative for debugging! Good work there!

best wishes
Patrick
0
Cem Alacayir Replied
Employee Post
By the way, I thought you were talking about the mobile viewer error discussed here:

But I guess you meant you want to run mobile viewer mode when on a tablet not only on a phone?
It seems DocumentViewer.MobileMode property is still broken. By default it's value is DocumentViewerMobileMode.OnAny but it seems it doesn't consider tablet as mobile device.
This will be fixed shortly (though tablets should be able to run full viewer normally).
0
Patrick Riehmers Replied
Hi Cem,

yes, i'm also in the discussion. Wasn't for me the same "problem" so i opened this case.
Indeed, we use Android Tablets and the Mobile mode feel more naturale for the users to work with the know touch gestures. Yes, my configuration is set to MobileMode.OnAny! I gave out a test version this night to our testgroup, should get some feedback in this afternoon.

Thanks, best wishes
Patrick
0
Patrick Riehmers Replied
Hi Cem,

do you have any updates on this case?

Thanks and best wishes
Patrick
0
Cem Alacayir Replied
Employee Post Marked As Resolution
Ok this is now fixed:

Version 6.9.8 - May 3, 2024

  • Fixed: DocumentViewer.MobileMode will be treated correctly. When OnAny (default value) mobile mode will be active both on phone and tablet.
    In addition to UA parsing in previous version, feature and screen size detection will be taken into effect to correctly determine
    it's a phone or tablet (even in desktop browser's emulation mode).

  • Fixed: incorrect code example in ImageOutputOptions class documentation.


In some cases, documentViewer.getUAParser().getDevice() may return undefined for device type because browsers increasingly limit the info in UA strings
There is a new method for testing this which additionally checks some features and screen size:
documentViewer.shouldUseMobileMode("OnAny")

documentViewer.shouldUseMobileMode("OnTablet")

documentViewer.shouldUseMobileMode("OnPhone")

Reply to Thread