0

I have started to use PhoneGap for mobile development and I had some issues with the number of pixels in the length and height of the screen. What is the standard number of pixels in the HTML screen for PhoneGap? Is it still the standard 960px like it is in desktop development? Or does it depend on the device itself?

Regards,

Ani

EDIT

This is not a repeat of "How to find the screen resolution of an Android device." I did not find this as a direct answer to my question here. Even though the correct answer is found here, I did not realize it. I believed there to be a fixed number of pixels in the HTML screen for mobile devices. This is also more broad than Android devices and extends to all mobile devices. Please excuse me for wasting your time on a possible duplicate.

Anish Muthali
  • 782
  • 2
  • 7
  • 20
  • 1
    It completely depends on the device. PhoneGap is just a wrapper around the browser component. – Pointy Apr 17 '15 at 23:21
  • possible duplicate of [How to get screen resolution of your android device..?](http://stackoverflow.com/questions/11338602/how-to-get-screen-resolution-of-your-android-device) – Amin Apr 19 '15 at 19:53

1 Answers1

0

Every device model has a different screen resolution.

Use the following to figure out the display size in pixels with PhoneGap

 function getDeviceDimention() {
        console.log("Device Dimention using PhoneGap");
        console.log("Width = " + window.innerWidth);
        console.log("Height = " + window.innerHeight);
    }
Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268