# What is the event when the device orientation changes on Android?

**URL:** <https://forums.unrealengine.com/t/what-is-the-event-when-the-device-orientation-changes-on-android/453878>\
**Category:** Mobile\
**Tags:** orientation, unreal-engine, Android, question\
**Created:** [August 15, 2019, 12:27am UTC](https://forums.unrealengine.com/t/what-is-the-event-when-the-device-orientation-changes-on-android/453878 "2019-08-15T00:27:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nVisionary](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nVisionary](https://forums.unrealengine.com/u/nVisionary)\
**Post date:** [August 15, 2019, 12:27am UTC](https://forums.unrealengine.com/t/what-is-the-event-when-the-device-orientation-changes-on-android/453878/1 "2019-08-15T00:27:27Z")

</div>

I found that I need to change the camera aspect ratio to 9:16 in portrait mode and 16:9 in landscape. I see that my game gets rotated when the device rotates. But what is the even that I can trigger on to set the aspect ratio change at the same time? I’m ok with either a blueprint or C++ implementation for this.

For background, I just started a blank project for mobile devices, defined Android as a platform, set “Sensor” in the project orientation setting, created a camera actor and then packaged it for Multi. I’m testing this on my Samsung Galaxy Note 8 with Android 9.

Research says that Android exposes this as an “onConfigurationChanged” event → [How to detect orientation change in layout in Android? - Stack Overflow](https://stackoverflow.com/questions/5726657/how-to-detect-orientation-change-in-layout-in-android).  
Is this passed through by any chance?

---

<div class="post-metadata">

**Author:** ![xuanyuan52](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xuanyuan52](https://forums.unrealengine.com/u/xuanyuan52)\
**Post date:** [February 22, 2021, 6:52am UTC](https://forums.unrealengine.com/t/what-is-the-event-when-the-device-orientation-changes-on-android/453878/2 "2021-02-22T06:52:16Z")

</div>

FCoreDelegates::ApplicationReceivedScreenOrientationChangedNotificationDelegate can get event

---

<div class="post-metadata">

**Author:** ![JayChang-zhe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JayChang-zhe](https://forums.unrealengine.com/u/JayChang-zhe)\
**Post date:** [October 26, 2021, 7:28am UTC](https://forums.unrealengine.com/t/what-is-the-event-when-the-device-orientation-changes-on-android/453878/3 "2021-10-26T07:28:29Z")

</div>

Yes, it works. Do you know how should i close UI changes automatic when rotate mobile screen with orientation set to sensor?
