Once I’ve loaded the app in Samsung Internet, if I rotate my phone landscape and rotate back to portrait the issue is fixed. It looks like it’s being set wrong initally.
This is also causing text elements that are apart of the screen to appear very small, even after correcting the resolution via scripts. Is it possible to refresh / update the screen component after updating the canvas resolution?
Sorry my memory was wrong, device pixel ratio is enabled in the editor. Here’s the code I’m using to check Samsung Browsers:
var ResolutionFixer = pc.createScript('resolutionFixer');
ResolutionFixer.prototype.initialize = function() {
if(navigator.userAgent.match(/SAMSUNG|SGH-[I|N|T]|GT-[I|P|N]|SM-[N|P|T|Z|G]|SHV-E|SCH-[I|J|R|S]|SPH-L/i)) {
setTimeout (this.fixResolution.bind (this), 0);
}
};
ResolutionFixer.prototype.fixResolution = function () {
var actualWidth = window.innerWidth;
var actualHeight = window.innerHeight;
this.app.graphicsDevice.resizeCanvas (actualWidth, actualHeight);
};
This was working last time I tested it, haven’t tested recently. Also I think the bug only appears when the phone is set to HD+ or FHD+. QWHD+ seems to be working without needing this fix.