# Get Viewport size returning wrong value in android in UMG?

**URL:** <https://forums.unrealengine.com/t/get-viewport-size-returning-wrong-value-in-android-in-umg/348848>\
**Category:** Mobile\
**Tags:** bugs, unreal-engine, question, UMG\
**Created:** [February 27, 2016, 11:14am UTC](https://forums.unrealengine.com/t/get-viewport-size-returning-wrong-value-in-android-in-umg/348848 "2016-02-27T11:14:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f287f87d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f287f87d](https://forums.unrealengine.com/u/anonymous_user_f287f87d)\
**Post date:** [February 27, 2016, 11:14am UTC](https://forums.unrealengine.com/t/get-viewport-size-returning-wrong-value-in-android-in-umg/348848/1 "2016-02-27T11:14:33Z")

</div>

Hi UE4 answerhub,

**The GetViewPortSize node in UMG returning wrong size while running in android (returning 0).**

**The same returns 931 while running in editor.**

Here I am attaching the screenshot for further comfort .

 ![80154-umg+wrong+viewport+size+in+android.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/7/097bf95dcadd3aceba55f5192bd513e739ac0207.jpeg)

---

<div class="post-metadata">

**Author:** ![Burnrate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Burnrate](https://forums.unrealengine.com/u/Burnrate)\
**Post date:** [January 19, 2019, 3:20am UTC](https://forums.unrealengine.com/t/get-viewport-size-returning-wrong-value-in-android-in-umg/348848/2 "2019-01-19T03:20:17Z")

</div>

I’m still getting this in 4.21, I guess it isn’t supported for all platforms… I think you need to use the FAndroidDeviceInfo information in C++ instead.

Not sure what you would do in BP. If you give the widgets a frame to setup you could probably get the cached geometry and use that to get the size of the parent (or reference a main widget that fills the screen and get that geometry).

---

<div class="post-metadata">

**Author:** ![cheetahaa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cheetahaa](https://forums.unrealengine.com/u/cheetahaa)\
**Post date:** [October 14, 2023, 12:06pm UTC](https://forums.unrealengine.com/t/get-viewport-size-returning-wrong-value-in-android-in-umg/348848/3 "2023-10-14T12:06:08Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/3/133b4fb52db05866f9cefa4495c4cf526749ebf6.png)  
add delay and get viewport size .

---

<div class="post-metadata">

**Author:** ![cheetahaa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cheetahaa](https://forums.unrealengine.com/u/cheetahaa)\
**Post date:** [November 16, 2023, 3:31am UTC](https://forums.unrealengine.com/t/get-viewport-size-returning-wrong-value-in-android-in-umg/348848/4 "2023-11-16T03:31:24Z")

</div>

always for your reply
