You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File in question: xplat/nativescript/core/src/lib/services/app.service.ts
This App Service gets the orientation on initialization and can be used for when the orientation changes. The getOrientation() function returns an empty string when it can't match landscape or portrait for UIDevice.currentDevice.orientation
At first I thought this was an issue with not being able to get the orientation on a simulator but I also tried on a few devices and got the same results. The service couldn't get the orientation so it defaulted to 0 which is Unknown, in this case it defaults to portrait.
This normally isn't an issue as many apps are portrait by default but for an app that needs to open in landscape and support landscape features properly, it doesn't quite work. The service does get landscape as the orientation but only after going from landscape (on open), to portrait then back to landscape.
I'm curious if this is a limitation of when this service gets initialized in the app lifecycle or if this is something that can be updated/improved, how that process would work?
Thanks
The text was updated successfully, but these errors were encountered:
File in question:
xplat/nativescript/core/src/lib/services/app.service.ts
This App Service gets the orientation on initialization and can be used for when the orientation changes. The getOrientation() function returns an empty string when it can't match landscape or portrait for
UIDevice.currentDevice.orientation
At first I thought this was an issue with not being able to get the orientation on a simulator but I also tried on a few devices and got the same results. The service couldn't get the orientation so it defaulted to 0 which is Unknown, in this case it defaults to portrait.
let orientation = getOrientation();
this.orientation = orientation ? orientation : CoreTypes.DeviceOrientation.portrait;
This normally isn't an issue as many apps are portrait by default but for an app that needs to open in landscape and support landscape features properly, it doesn't quite work. The service does get landscape as the orientation but only after going from landscape (on open), to portrait then back to landscape.
I'm curious if this is a limitation of when this service gets initialized in the app lifecycle or if this is something that can be updated/improved, how that process would work?
Thanks
The text was updated successfully, but these errors were encountered: