Turn off the automatic rotation function of the mobile phone, what statement does the program use to achieve?

B
^
The picture is the phone auto-rotating menu

How to use app inventor 2 to turn off the automatic rotation of the phone?

You don't need to make a program. First go to the Screen component and go to properties and select the screen orientation.

There is a property on the screen -

image

You can chose what you like :slight_smile:

Pictures help a bit more @Alpha2020 :wink:

Thank you.....

Which one to choose?

Its upto you!
If your app is portrait, chose portrait.

If you want it to be user friendly, chose user specified.

Landscape when you have a wide screen (generally in games)

Sensor will be used according to the mobile sensors

For auto-rotation you may use Unspecified