screenSize.width and screenSize.height in getPreferenceValues

Is there correct way to get screen resolution?
According to documentation there is getPreferenceValues luna service which should return appropriate values by keys "screenSize.width" and "screenSize.height".

But it's return "walpaper" property
image

There is warkournd:
But for that purpose need to call captureScreen and parse resolution.
image

Hi, Yuri.

If you want to get screen resolution from webOS OSE, below API will be helpful to get.

# luna-send -f -i luna://com.webos.service.config/getConfigs '{"configNames ":["com.webos.surfacemanager.compositorGeometry"]}'

    Response:

    {
        "subscribed": false,
        "configs": {
            "com.webos.surfacemanager.compositorGeometry": "1920x1080+0+0r0"
        },
        "returnValue": true
    }  
1 Like

Thank you very much!
Unfortunately It's predefine value it's always full HD.
image

I checked with 1680x1050(screen above) and with 2560x1080
image

NB: There is misprint in docs in "configNames " need to remove space. :slight_smile:

I'm utilizing workaround to get correct screen resolution. :confused:

1 Like

You are right, compositorGeometry is predefined value. I will let you know when I will be found a solution to get screen resolution.