Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12910

Cordova Android uses wrong screen density

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • cordova@7.0.0
    • None
    • cordova-android
    • Samsung Galaxy Tab S and Galaxy Tab S2, Android 6.0.1

    Description

      In some circumstances, the Cordova webview uses wrong screen density, resulting in blurrier text and images.

      With the default blank Cordova app (cordova create MyApp; cordova add platform android; cordova run android), at least on two tablets - Samsung Galaxy Tab S 8.4" and Samsung Galaxy Tab S2 8" on Android 6.0.1, if one runs window.devicePixelRatio, the result is 1.5 instead of 2. Querying the same from Chrome or Samsung browser yields the correct result, 2.

      I tested the same app on a Samsung Galaxy A3 2017 phone, also running Android 6.0.1 and the result was correct, so the issue does not affect all devices.

      I tested with a more complex app and the difference between Cordova and browser is noticeable.

      Of course, the default app uses the viewport metatag <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> and no plugins.

      Attachments

        1. sharp-blurry.png
          34 kB
          Gaspy

        Activity

          People

            Unassigned Unassigned
            gaspyy Gaspy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: