Requesting Permission To Rotate The Phone

How can I ask a permission by user to rotate the phone in Landscape?

i suggest you to check out properties of screen.

screen>properties>screen orientation

there are several properties as below:

image

you can choose which screen orientation that u prefer

for portrait and landscape it is same as basic use

for sensor -- it will detect phone position and rotate accordingly

for user --it will rotate as user phone setting (as there are lock orientation setting in nowdays phone)

example of portrait orientation lock in nowdays phone

I know this but if I don't allow auto-rotate in mobile, then I go from Screen 1 (Landscape) to Screen 2 (Landscape) in the application. First Screen2 comes in Portrait, after some time it changes to Landscape. So how can I see Screen2 only in Landscape not in Portrait (even for some seconds)?

Please anybody help me to solve this problem.

to set screen2 in landscape orientation just change in the setting and it will always open as landscape.The answer is as i explained above .

screen2 >properties> screen orientation >set as Landscape

this screen will always appear as landscape even if dont allow auto-rotate in mobile.

i will share project file so u can see clearly.

testing_screen.aia (2.6 KB)

hope this solve the problem

1st Video


2nd Video

See the difference in the above two videos. In the first video, when I switch from Screen1 to Screen2 or Screen2 to Screen1 and also turned off the Auto-Rotate then the Screen first goes to Portrait Mode fore few seconds then goes to Landscape by itself. In the second video, when I switch from Screen1 to Screen2 or Screen2 to Screen1 and also turned on the Auto-Rotate, only then the Screen goes to Landscape for full time.
So, I want a permission ask by the user to turn on the Auto-Rotate because in Portrait Mode for some seconds change the full layout of the Screen that is not good for my app.

Please help in this

Perhaps you should be using virtual screens instead of Screens. If you insist in changing Screens, post your Project aia (or an example showing what you are talking about) so that someone could provide advice based on information.

Please show what you have done so that


See the video. In the video, when the Screen goes in Portrait Mode, then it ruined the whole layout. So please tell me how the app did not go in Portrait Mode even for milliseconds? And also when I minimize the app, then also the background sound of the app is coming but the sound go when I fully close the app. So, please tell me how can I remove the background sound when the app minimize?

You video is not helpful. Sorry.

So how can I make it helpful?

The video cannot be used to diagnose the problems. Someone needs an example in an aia to solve the problems you are bothered with. The video shows the problem. No one can test the code you use. Sorry.

Okay but what is the guarantee that the app will not leak?

See

1 Like

2 posts were split to a new topic: How can I pause or stop background sound when I minimize the app?

Now, also I am unable to ask the permission or unable to rotate the screen directly in landscape when it open. The problem is still the same.

How can I post .aia to you personally.

It is very difficult for me to put all the existing layouts under Horizontal Layout on the screen.

Sorry, not possible to post to me personally. You may post here in the community your Project or an excerpt from your main Project that illustrates the rotation issue you experience. That is, make an example you feel comfortable sharing.

Did you try @dora_paz advice?

Here is my .aia KiDi.aia (955.1 KB)