Get screen width using java

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

1 Like

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

The answer to your question is on the scrSystemInfo screen.

1 Like

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?


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

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

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

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.

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.

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.

Check it