Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immediate refresh of drawn strokes on ONYX e-ink displays (RawDrawing) #1195

Open
2 tasks done
TekkertheChaot opened this issue Mar 28, 2024 · 10 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@TekkertheChaot
Copy link

TekkertheChaot commented Mar 28, 2024

Before submitting an issue, please check the following

  • I have searched for similar issues (both open and closed) and cannot find a duplicate
  • I agree to follow the Code of Conduct

Motivation

One thing to make writing on e-ink-tablets like ONYX tablets way more comfortable is to update the pen stroke immediately as it is being drawn. This helps during writing, sketching and feels way more natural to the user.
With this I'm not refering to the normal "draw to UI"-call but to update the display directly.

With the proposed solution, ONYX users have the ability to use higher quality display modes, which would increase display latency under normal usage (like its currently the case) except for pen strokes which update directly while being drawn.

Solution

If I understand correctly, the onyx-sdk offers the functionality to directly and immediately refresh the display in the area where the pen-stroke is being drawn in.

I think the way to do this, is by using the "RawDrawing"-Mode and using the RawInputCallback to quickly draw a bitmap to the display itself. This could reflect a rough estimate on the display on how the pen-stroke looks, that can be fully updated once the penis lifted from the display. The official OnyxAndroidDemo project does this somewhat similarly.

Notable is another app that is specifically build for ONYX tablets that also utilizes the RawDrawing-mode.
The official OnyxAndroidDemo project may also have a demo on how to refresh it immediately, but unfortunately,

Alternatives

No response

Saber version

0.21.2 GooglePlay (21020)

Device

  • Device: ONYX BOOX Tab Ultra
  • OS: Android 11

Anything else?

No response

@TekkertheChaot TekkertheChaot added the enhancement New feature or request label Mar 28, 2024
@adil192
Copy link
Member

adil192 commented Mar 30, 2024

This seems the same as what we currently have in OnyxsdkPenArea.kt.

You may be referring to how the screen doesn't fully refresh for 1s after you draw with the pen. This is intentional:

1.0.2
Refresh the screen after 1s (default). This fixes the issue where after writing with the pen, the screen wouldn't respond to your finger.

You're free to submit PRs if you can improve the implementation, but I no longer have an Onyx device to test any further development

@TekkertheChaot
Copy link
Author

TekkertheChaot commented Apr 1, 2024

This seems the same as what we currently have in OnyxsdkPenArea.kt.

Oh, I have completely missed that, sorry!

You may be referring to how the screen doesn't fully refresh for 1s after you draw with the pen. This is intentional

Ahh, not quite. The intentional fix you've mentioned seems to be referring to the screen refresh after pen inactivity. This would coincide with the refreshing I have observed in the current version of the app (but I may be completely mistaken, it's just my understanding).
I've meant the immediate refresh while drawing.
Currently, it is completely dependent on the screen refresh mode:
pen stroke comparison
Noteable, for example, doesn't care for the refresh mode

You're free to submit PRs if you can improve the implementation, but I no longer have an Onyx device to test any further development

Understandable and fair! Maybe this will be THE push for me to get into android app development... 😉

@adil192
Copy link
Member

adil192 commented Apr 4, 2024

When I had my onyx boox note air2, it worked like the notable app did in your gif (#186)
@ma-con Is it still working for you?

@adil192
Copy link
Member

adil192 commented Apr 4, 2024

Can you confirm you downloaded Saber from the Play Store and not somewhere else like F-Droid?

@TekkertheChaot
Copy link
Author

When I had my onyx boox note air2, it worked like the notable app did in your gif (#186)

Hmmm, weird. 🤔

Can you confirm you downloaded Saber from the Play Store and not somewhere else like F-Droid?

Yeah, I got it from the play store:
IMG_20240404_140748~2.jpg

@TekkertheChaot
Copy link
Author

I really want to rule out user error, before I dive into a self learning course for Android development.
Are there any accessible settings that could affect this?
Otherwise, Android Studio is downloading in the background... ;)

@favba
Copy link

favba commented May 7, 2024

I have an Onyx Boox Note Air 2 Plus and Saber installed from Google Play.
Saber used to have fast pen strokes but that hasn't worked for several months by now. I cannot remember which update broke this, but I can confirm (or at least give one more data point) that the fast pen strokes are not working anymore on Onyx Boox devices.

@ghost14622
Copy link

I have an Onyx Boox Note X3s and Saber installed from Github.
The fast pen strokes are not working anymore on Onyx Boox devices. And when i was writing the whole screen would refresh but not the writing part. Hope we can fix it.

@TekkertheChaot
Copy link
Author

As I am new to programming in dart (and flutter & kotlin for that matter) I am only slowly starting to understand how things are handled.
Unfortunately, I cannot get the required OnyxpenSDK module running in flutter on my end.
Something about how no module repo (maven, google, etc. ) is able to serve the referenced libraries.
I think I am too inexperienced to get it working myself for now...

@ghost14622
Copy link

As I am new to programming in dart (and flutter & kotlin for that matter) I am only slowly starting to understand how things are handled. Unfortunately, I cannot get the required OnyxpenSDK module running in flutter on my end. Something about how no module repo (maven, google, etc. ) is able to serve the referenced libraries. I think I am too inexperienced to get it working myself for now...

That's all right. We are lucky to have Saber. It's enough for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants