I am implementing one phonegap application. Here everything going fine but when I am talking device specifications like:
1)BlackBerry Bold Touch 9900 Screen specifications are as following
Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in)
Weight 130 g (4.59 oz)
Keyboard QWERTY Display Type TFT capacitive touchscreen, 16M colors
Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density)
But when I test following function in java script:
function findScreenSize()
{
alert("width:"+window.innerWidth +"Height:"+ window.innerHeight);
}
It displaying SIZE width : 356 Height : 267 (356 x 267)
2)BlackBerry Bold Touch 9930 Screen specifications are as following
Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in)
Weight 130 g (4.59 oz)
Keyboard QWERTY - Touch-sensitive controls
Display Type TFT capacitive touchscreen, 16M colors
Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density)
Then I run same javaScript function I got following output:
it displaying SIZE width : 417 Height : 313 (417 x 313)
Why it is behaving like this ?
Can anybody know relation between core pixel and HTML pixel please give answer
I got solution that
previously i am using following meta tag (add ‘<‘ starting of following two meta tags)
meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no”>
But now i am using
meta name=”viewport” content=”width=device-width,target-densitydpi=device-dpi,user-scalable=no,initial-scale=1.0″>
now it is showing same