Simplified SDK

In YotaDevices SDK version 3.7.10, new simplified version of SDK for EPD was introduced. This SDK consists only of a few methods that dramatically simplifies development for EPD.

Update modes

The Waveforms and Dithering concepts are difficult to understand for third-party developer who is not familiar with EPD technology. To solve this, YotaDevices SDK makes available the Drawing Modes. With Drawing Modes developer has no need to think about Dithering and Waveforms in his application – the system will do it by itself automatically.

There are 3 drawing modes:

    public static final int UPDATE_MODE_HIGH_QUALITY = 0;
    public static final int UPDATE_MODE_HIGH_SPEED = 1;
    public static final int UPDATE_MODE_ADAPTIVE = 2;

UPDATE_MODE_HIGH_QUALITY

This mode uses PARTIAL Waveform together with the 16-color Dithering. It gives 16-colors high quality updates, but low update speed.

This mode is good for beautiful images, that doesn’t change very often.

UPDATE_MODE_HIGH_SPEED

https://yotaphone.com/media/3_simplified+sdk_a2b.gif

This mode uses A2 Waveform together with the 2-color dithering. It gives 2-color good quality updates with fast update speed.

This mode is good for interface interaction, like scrolling, typing or making selfies.

UPDATE_MODE_ADAPTIVE

With this mode, display immediately switches to UPDATE_MODE_HIGH_SPEED mode, if image on EPD is frequently changed. For example, when user starts to interact with it. When an image goes back to static, it switches to UPDATE_MODE_HIGH_QUALITY.

It is good for interfaces that require combination of speed and beautiful look at the same time.

The difference between UPDATE_MODE_ADAPTIVE and UPDATE_MODE_HIGH_SPEED is that the reaction of first user interaction in UPDATE_MODE_ADAPTIVE is a little slower then UPDATE_MODE_HIGH_SPEED reaction.

These modes can be configured by using the function com.yotadevices.sdk.Epd.setUpdateMode():

    public static void setUpdateMode(final View view, final int updateMode)

final View view - should be the rootView of your activity (DecorView). If it isn’t a rootView, it will go through the view hierarchy till rootView will found, and it will set updateMode up to the rootView.

Full Update

Full Update is the update that can do the best possible quality image and eliminate the ghosting effect at same time. When Full Update is finished, EPD will produce flashing effect.

It is good for:

– Significant events in user interface, like new activity started or dialog window opened;

– If some ghosting effect is visible and needs to be cleared.

https://yotaphone.com/media/3_simplified+sdk_full_update.gif

To perform full update you need to use com.yotadevices.sdk.Epd.fullUpdate():

    public static void fullUpdate(final View view, final boolean now)

final View view - should be the rootView of your activity (DecorView). If it isn’t a rootView, it will go through the view hierarchy till rootView is found, and it will set updateMode up to the rootView.

final boolean now - if “true”, it will immediately trigger single full update for the window. If “false”, it will trigger single full update on next time when something changes on the screen.