I know there are many questions similar to my headline, but I could not find the answer I want.
In my application, I use window.innerWidthand window.innerHeightto get the screen size, but these two values return a different size. For example, when I run my application in Note 3, I get 360x615, whereas it should be 1080x1920.
The following code in Java gives me what I want:
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
So, is there a way in Phonegap to get the same screen size as Java?
Update: when I test the same code on note 2 with Beans jelly, I get the correct size 720x1230
source
share