# Get screen width using java

**URL:** <https://community.thunkable.com/t/get-screen-width-using-java/142338>\
**Category:** Questions about Thunkable X\
**Created:** [July 14, 2019, 5:26am UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338 "2019-07-14T05:26:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sysads](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sysads/32/44975_2.png) [@sysads](https://community.thunkable.com/u/sysads)\
**Post date:** [July 14, 2019, 5:26am UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/1 "2019-07-14T05:26:46Z")

</div>

I was wondering how I can use web api and java to get the width and height of any mobile device.

---

<div class="post-metadata">

**Author:** ![samclever](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@samclever](https://community.thunkable.com/u/samclever)\
**Post date:** [July 14, 2019, 6:52am UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/2 "2019-07-14T06:52:57Z")

</div>

Are you having the user select their device and then calling the specs via a webapi?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 14, 2019, 7:13am UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/3 "2019-07-14T07:13:27Z")

</div>

The answer to your question is on the scrSystemInfo screen.

[https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/](https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![sysads](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sysads/32/44975_2.png) [@sysads](https://community.thunkable.com/u/sysads)\
**Post date:** [July 15, 2019, 12:42pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/4 "2019-07-15T12:42:04Z")

</div>

Hi, I was able to display the width using the web viewer but how do you save the result into a list so I can extract the bit i need?

or

Is there no way of extracting the phone size without needing to connect to the internet?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 15, 2019, 1:31pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/5 "2019-07-15T13:31:59Z")

</div>

Without the use of the Internet, this is not possible in the current version of Thunkable X

---

<div class="post-metadata">

**Author:** ![sysads](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sysads/32/44975_2.png) [@sysads](https://community.thunkable.com/u/sysads)\
**Post date:** [July 15, 2019, 1:32pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/6 "2019-07-15T13:32:39Z")

</div>

OK I get it but when the info is displayed via web viewer, how do i extract the data?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 15, 2019, 1:35pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/7 "2019-07-15T13:35:12Z")

</div>

So output the data not in the WebViewer, but in any other component. I display it in a WebViewer in order to format the data.

---

<div class="post-metadata">

**Author:** ![sysads](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/sysads/32/44975_2.png) [@sysads](https://community.thunkable.com/u/sysads)\
**Post date:** [July 15, 2019, 1:39pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/8 "2019-07-15T13:39:39Z")

</div>

Maybe I am missing something. The script is called via URL which web viewer is currently able to do. If I am using label, there is no URL to get the data first before outputting it into text.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 15, 2019, 2:26pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/9 "2019-07-15T14:26:45Z")

</div>

I’ll give you an answer later. You must use a web server or the Firebase Javascript API to get the given dimensions in the app. At the forum, I somewhere gave such a message. Need to search.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [July 15, 2019, 2:28pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/10 "2019-07-15T14:28:31Z")

</div>

Check it

[https://x.thunkable.com/projects/5af67d033098b30001ec63ef/project/properties/designer/](https://x.thunkable.com/projects/5af67d033098b30001ec63ef/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:12pm UTC](https://community.thunkable.com/t/get-screen-width-using-java/142338/11 "2024-11-08T12:12:14Z")

</div>


