After build on android, cc.view.getFrameSize() have different values than browser preview

Hi all. I am using cc.view.getFrameSize().width to detect some zoom value for camera, but I have different values of width on android installed version and version what I just run from browser:

Version in mobile browser (also the same in cocos creator preview localhost on laptop):

Android, log from Android Studio:

how I create and log this:

Hi, the getFrameSize() returns the frame size of the view.
On native platforms, it returns the screen size since the view is a fullscreen view.
On web, it returns the size of the canvas’s outer DOM element.

Maybe you can refer to this document:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.