语言

Menu
Sites
Language
How to get AOD OPR in Tizen Studio. (Current On Pixel Ratio 15% Emulator Gear Always On Display SDK Library Method Test)

How to get AOD OPR percentages in Tizen Studio?

Is there kinda a library function that returns Current On Pixel Ratio?

How to turn on and use AOD (Always On Diaplay) on Emulator? I only found apprporiate tab in emulator settings and turned it, but it didn't make much of difference.

编辑者为: Anonymous 03 5月, 2019

响应

6 回复
André Reus

I suspect it isn't the same.

Even if I get screen brightness level for AOD (always on display) it will be always the same no mather what is displayed.

Gear Watch Designer has service which dynamically calculates AOD OPR percentages depending on what is displayed during AOD mode.

So I wondering whether there kinda API for Tizen Studio to get AOD OPR percentages.

Or some code which alows to get the same thing.

André Reus

One thing you can do is, detect the current mode and decide accordingly! 

 // Add an eventListener for timetick
        window.addEventListener("timetick", drawAmbientWatch);

        // Add an eventListener for ambientmodechanged
        window.addEventListener("ambientmodechanged", function(e) {
            if (e.detail.ambientMode === true) {
                // Rendering ambient mode case
                activateMode("Ambient");
            } else {
                // Rendering normal case
                activateMode("Normal");
            }
        });

        // Add an event listener to update the screen immediately when the device wakes up
        document.addEventListener("visibilitychange", function() {
            if (!document.hidden) {
                if (isAmbientMode === true) {
                    // Rendering ambient mode case
                    activateMode("Ambient");
                } else {
                    // Rendering normal case
                    activateMode("Normal");
                }
            }
        });

 

It's not a problem to get whether AOD is turned ON or not.

This topic is about getting AOD OPR percentages in Tizen Studio like it shows in Gear Watch Designer.

André Reus

GWD is different thing .... as far my knowledge Tizen doesn't provide these API .. If you find please share with us ... 

Duncan Wood

this is an old topic but it may be usefull for others

The only way I've found to see the OPR is to test on a real device and then goto:

Settings -> Developer options -> On Pixel Ratio

turn that on and it will show at the top

https://developer.samsung.com/galaxy-watch-design/watch-face/states.html

 

I'm trying to find out how to test AOD on the emulator but cant find any info,

"Anonymous" you said that "I only found apprporiate tab in emulator settings"

can you explain?