Force windows WebView to load content in Portrait mode - xaml

I have windows phone 8.1 game created on unity3d. It's support landscape orientation only. But I need a WebView in my game to load a page in portrait mode.
How to force WebView to load content in Portrait mode?

This is not exactly what i need, but for now i use
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
when WebView load a page, and
DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape;
when close WebView and go back to game.

Related

How Can I Overlay Content on Top of HTML5 Video in Mobile Landscape Mode

I'm creating a mobile app using Ionic 4. I want to overlay some text and icons on top of an html 5 video in the app. The overlay is visible using position absolute when the phone is in portrait mode but disappears when the phone is in landscape mode. How can I make the text and icons visible in landscape mode?

Xcode 6 custom launch screen

I am trying to make a custom launch screen based Xcode 6 new feature following the content given here. I don't understand how can I manage orientation of launch screen on iPad. My launch screen contains a horizontal rectangular image in the centre. Using size classes I can set different constraints and views for iPhone in landscape or portrait mode. But unable to do the same for iPad. Also how can I lock the orientation of Launch screen when creating a launch screen using the above method ?
You can not do this for the iPad because both orientations fall under the regular width and regular height size class.

Using MediaElement in Windows Phone 8.1 app

I'm developing a Windows Phone 8.1 app that plays a video using the MediaElement control. I'm facing some problems for which I've not been able to find information. I've uploaded an example app here: https://mega.co.nz/#!s9sFiQDK!JDI9ar8qWqWIZ_Ot-Q8K8X0qfQ5YG7ATLAiHypOs5Ow
If a click the button in the default page, the app navigates to a second page that contains a MediaElement to play a video. My app is configured to be Portrait only, but I want the video to be displayed in Landscape. For this, I'm changing the screen orientation when clicking on the button and before navigating to the video page with this line: Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences = Windows.Graphics.Display.DisplayOrientations.Landscape; The problem with this is that I can see in the app when the orientation is changing which looks ugly. How can I do to make the video display in landscape without having to change the orientation of the screen? I've seen in the Facebook app that when a video opens, the app does navigate to another page (or at least it seems so from the transition animation that I see) but even though, videos open and play in landscape, there is no screen rotation.
I want to hide the StatusBar before the page with the video is displayed. I've put this line statusBar.HideAsync(); in various places but regardless, I always see that the StatusBar is still hiding when the video is already visible and playing. Again, the Facebook app does hide the StatusBar before the video is shown in the screen.
When the video is playing, if I press and hold the back hardware button, the app is minimized. Now, if I click on its screenshot to go back to it, the app comes to the foreground, but the video is not playing anymore. If I tap on the video to see the video controls, I can see that the video progress line is moving, but the video is like frozen. If I pause the video and play it again, the video resumes. How do I do to make the video to continue to play when the app comes to the foreground? In the Facebook app when I do this, the app comes to the foreground, but the video page is closed and the app takes me to the timeline page. Is this the only way of doing it? If so, how do I detect that when the app comes to the foreground there is a video playing so I can close the page and navigate to the previous one.
If you always want the video page in landscape mode, you can call
Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences = Windows.Graphics.Display.DisplayOrientations.Landscape;
in the page constructor, after InitializeComponent();
Calling
StatusBar.GetForCurrentView().HideAsync();
in the main page constructor is working fine for me.
I still have the same problem, I've tried different approaches, but I can't even get App.Resuming event (and unfortunately in Windows Phone 8.1 WinRT OnNavigatedTo is not triggered on app resuming).

iPhone home screen capture programmatically from app

I have a jailbroken iPhone device. I want to programmatically take iOS 7/iPhone screenshots (2/3/4 screens) of the app icons and store them in an image view. However, I don't want to capture the app's home screen, that is the iPhone's main screen.
Is there a solution?

Start iPad application both in landscape and portrait mode

Right now when I start my iPad application, if I'm turning my device in landscape mode then my rootConroller automatically turns my table from portrait to landscape mode. The problem is that it does so by animating the transition. Instead I would like the app to start in landscape mode right away. I've also created an image called Default-Landscape.png which is ignored, so I suspect I have to tweak something in the plist file?
Set your orientation to UISupportedInterfaceOrientations in the Info.plist file