{ "id": "113914", "key": "AC-2052", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2013-06-04T20:14:22.000+0000", "created": "2013-05-07T10:25:04.000+0000", "labels": [ "Android", "Nexus-7" ], "versions": [], "issuelinks": [], "assignee": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:00.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "On Google Nexus 7 16GB WiFi, Titanium API returns wrong dpi, density, height and width. Log is pasted below.\r\n\r\n05-07 15:24:11.320: I/TiAPI(7320): calculatedDpi : 160\r\n05-07 15:24:11.320: I/TiAPI(7320): Ti.Platform.displayCaps.density : medium\r\n05-07 15:24:11.320: I/TiAPI(7320): platformHeight : 905\r\n05-07 15:24:11.320: I/TiAPI(7320): platformWidth : 601\r\n\r\nNexus 7 has following properties :\r\ndpi : 216 \r\ndensity : high\r\nheight : 1280\r\nwidth : 800\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : \"#FFF\"\r\n });\r\n\r\nwin.open();\r\n\r\nalert('Ti.Platform.displayCaps.density: ' + Ti.Platform.displayCaps.density);\r\nalert('Ti.Platform.displayCaps.dpi: ' + Ti.Platform.displayCaps.dpi);\r\nalert('Ti.Platform.displayCaps.platformHeight: ' + Ti.Platform.displayCaps.platformHeight);\r\nalert('Ti.Platform.displayCaps.platformWidth: ' + Ti.Platform.displayCaps.platformWidth);\r\nif(Ti.Platform.osname === 'android'){\r\n alert('Ti.Platform.displayCaps.xdpi: ' + Ti.Platform.displayCaps.xdpi);\r\n alert('Ti.Platform.displayCaps.ydpi: ' + Ti.Platform.displayCaps.ydpi);\r\n alert('Ti.Platform.displayCaps.logicalDensityFactor: ' + Ti.Platform.displayCaps.logicalDensityFactor);\r\n}\r\n{code}\r\n\r\nsource : \r\nhttps://play.google.com/store/devices/details?id=nexus_7_16gb&feature=device-featured#?t=W251bGwsMSwxLDIwMiwibnVsbC13ZWJfaG9tZV81MDAwMDA1X25leHVzSU5fZGV2aWNlc19JTl9fNTAwMDAwNV9uZXh1c0lOXzFfcHJvbW9fMTM2NzYyNDkxOTkzMSJd\r\n", "attachment": [], "flagged": false, "summary": "Google Nexus 7 tablet returns wrong dpi, density, height and width.", "creator": { "name": "vatsalengg.investis@gmail.com", "key": "vatsalengg.investis@gmail.com", "displayName": "Vatsal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vatsalengg.investis@gmail.com", "key": "vatsalengg.investis@gmail.com", "displayName": "Vatsal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Mac OSX 10.7.5, \r\n2.3 GHz Intel Core i5,\r\n4 GB 1333 MHZ RAM,\r\n\r\nTitanium SDK 3.1.0 GA,\r\nTitanium Studio, build: 3.1.0.201304151600\r\nBuild: jenkins-titanium-rcp-master-417 (origin/master)\r\nDate: 15 April 2013, 16:04:14", "comment": { "comments": [ { "id": "255919", "author": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello Vatsal,\n\nI have tested the code above on a Galaxy S3 which provided all the correct values for platform height, dpie, width and density. As I do not have a nexus 7 would you do me a favor and run the code provided above in the description and take screenshots to show the actual values? This proves validity to the claim without having me to reproduce the bug myself. Thanks for your cooperation. \n\nRegards,\n\nCarter", "updateAuthor": { "name": "clathrop", "key": "clathrop", "displayName": "Carter Lathrop", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-04T20:14:10.000+0000", "updated": "2013-06-04T20:14:10.000+0000" }, { "id": "284486", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi Vatsal,\n\nAccording to Dianne Hackborn, an Android framework engineer:\n\"They need to be set by the manufacturer (there is no way for the platform to know what they are), and as of today they are just not consistently set correctly across devices, and because nothing in the platform relies on them it is easy for devices to have them set incorrectly.\"\n\nThe Titanium DPI calls are just calling the underlying context.getResources().getDisplayMetrics().density. These values look to be set elsewhere. You may be able to get correct values by updating your Android SDK to a higher or to the latest version. Could you please try that?\n\nSeeing as we have not heard from you since June I will be closing this ticket, but please feel free to re-open it or to comment here if you have any additional information or questions. Thanks!", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-16T18:37:36.000+0000", "updated": "2013-12-16T18:37:36.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }