Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2158] Google Nexus 4 / LG Optimus G phones returning logicalDensityFactor = 160

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-20T14:53:05.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsAndroid, displaycaps
ReporterJoe Falcone
AssigneeDavide Cassenti
Created2013-03-19T19:44:33.000+0000
Updated2016-03-08T07:41:08.000+0000

Description

Just distributing our app for testing and two testers reported that the main tableView of the screen is empty (never seen this on any platform before). After inspecting logcat, we noticed that Ti.Platform and Ti.Platform.displayCaps is returning: I/TiAPI (12464): os version 4.2.2 I/TiAPI (12464): platform height: 611 width: 384 I/TiAPI (12464): density: medium dpi: 160 logicalDensityFactor: 160 The display is actually 1280x768 and the dpi is actually 318 so the logicalDensityFactor should be around 2 or so.

Comments

  1. Davide Cassenti 2013-03-20

    Hello, I cannot reproduce the problem. Tested with Nexus 4:
       Ti.API.info(Ti.Platform.displayCaps.platformWidth);
       Ti.API.info(Ti.Platform.displayCaps.platformHeight);
       Ti.API.info(Ti.Platform.displayCaps.density);
       Ti.API.info(Ti.Platform.displayCaps.logicalDensityFactor);
       
    This is the result:
       I/TiAPI   (23553): 768
       I/TiAPI   (23553): 1184
       I/TiAPI   (23553): xhigh
       I/TiAPI   (23553): 2
       
    Tested with SDK 2.1.4 and 3.0.2
  2. Joe Falcone 2013-04-12

    Users finally fessed up that they were not running stock Android but rather a hacked Android distribution (jeez).

JSON Source