Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to get actual (physical) screen resolution?
Started by MauMau Nov 14 2018 04:00 AM

- - - - -
2 replies to this topic
display screen resolution size pixels
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

MauMau

[GLOBAL: userInfoPane.html]
MauMau
  • Contributor

  • 123 posts
  • Corona SDK

Is there any way to retreive the actual (physical) screen resolution of the current device? No matter what I try, the simulator always returns an incorrect resolution which is smaller than the resolution of the selected hardware device.

 

I'd need to be able if the app is running on a low res or high res Android device (1080p or better).

 

 

 



[TOPIC: post.html]
#2

anaqim

[GLOBAL: userInfoPane.html]
anaqim
  • Contributor

  • 770 posts
  • Corona SDK

https://docs.coronalabs.com/api/library/display/index.html

 

if i am not mistaken, display.pixelWidth and display.pixelHeight should work.



[TOPIC: post.html]
#3

MauMau

[GLOBAL: userInfoPane.html]
MauMau
  • Contributor

  • 123 posts
  • Corona SDK

Works -thanks a lot! ^_^




[topic_controls]
[/topic_controls]