Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

S-pen related enhancement suggestions

Open CodeGrepicious opened this issue 4 years ago • 17 comments

The S pen button on my Samsung tab s7+/Note 20 ultra and even Note 8 for erasing works in whiteboard mode. I would like to suggest enpabling an option so that when you have a stylus, you can let it produce written input just when you're using your stylus, so that you can use your finger for gestures scrolling etc.

Also, S-pen gestures serious be nice. Swiping up down left right etc. Similar to the finger gestures. Also just clicking or double clicking the s pen far away from the screen.

CodeGrepicious avatar Oct 19 '21 11:10 CodeGrepicious

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

welcome[bot] avatar Oct 19 '21 11:10 welcome[bot]

I can imagine these would be nice, and I am all for more input methods, but I just want to set expectations that this may not receive attention unless a person with an S-pen helps us develop the feature (@NicoWeio was the contributor that lent a hand last time, for what it's worth). We're happy to collaborate with anyone that wants to give it a shot and has the hardware though of course

mikehardy avatar Oct 19 '21 13:10 mikehardy

Thanks for the issue! We've had a fair few people ask about the S-Pen over the years.

To further discussion: is there an open source SDK for the S-Pen?

This sadly may need to be the first step to get the gestures working. I've taken a brief look previously and it seemed like everything was fairly simple but proprietary.

david-allison avatar Oct 19 '21 13:10 david-allison

If @DanielMedYT means gestures with a stylus on the screen, that should be almost trivial since stock Android's InputEvent API knows whether a stylus is used. For more advanced gestures, detecting whether the S-pen button was pressed while performing the gesture is possible, as that's basically what I did in #8138.

Regarding air gestures, however, that probably does require Samsung's SDK.

As a side note, I don't currently have time to work on this.

(Not sure about the names in italics – I'm writing this from memory on my smartphone.)

NicoWeio avatar Oct 19 '21 14:10 NicoWeio

Here's open SDK for s pen https://developer.samsung.com/galaxy-spen-remote/s-pen-remote-sdk.html. I believe all the functionality would work if you follow the official samsung instructions to integrate spen SDK which is here https://developer.samsung.com/codelab/s-pen-remote/s-pen-remote-sdk.html#

SurajJhaIn avatar Nov 17 '21 04:11 SurajJhaIn

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Jan 16 '22 04:01 github-actions[bot]

My phone has an SPen so I could do this if it's accepted.

Reviewing cards with Air gestures like Harry Potter must be so fun

As commented above, here's the open SDK https://developer.samsung.com/galaxy-spen-remote/overview.html, though I don't know where to put these .jar files on AnkiDroid

BrayanDSO avatar Apr 13 '22 17:04 BrayanDSO

@BrayanDSO their license seems wholly incompatible (hostile even?) to open source apps. If they want this to be adopted at all the need to specify that the JAR file is MIT or APL or something. If you can prove me wrong please do, I'd love to see people go Harry Potter on their cards :-) Could maybe tag along here https://forum.developer.samsung.com/t/disabling-spen-air-command-for-the-app/18585

mikehardy avatar Apr 13 '22 21:04 mikehardy

Oh, that's true. I didn't see the license 😅

Thanks for the notice 👍🏻

I'll send a message to their support asking for the license, though I don't expect a positive answer, or even an answer.

If maybe, by chance, perhaps, who knows, in a beautiful sunny day, or Christmas, they add a good license, this may be feasible

BrayanDSO avatar Apr 13 '22 22:04 BrayanDSO

This came up in a play store review comment again. People want the S-Pen, but the license is hostile. Did you get any feedback from them @BrayanDSO ? Just curious

mikehardy avatar Jun 13 '22 15:06 mikehardy

Nope

BrayanDSO avatar Jun 13 '22 15:06 BrayanDSO

Is the reason for the "hostility" that people would be able to view the code, and Samsung doesn't want the S-pen gestures code to be visible? Why would it be different with non-open-source apps. I am sure anyone that really wants to access it would still be able to. Seems like Samsung is a bit too careful here, don't they see that these features are opportunities for Samsung users to actually appreciate having an S-pen supported device even more. Maybe we could contact Samsung themselves on this matter? Anki(Ankidroid) is a pretty well-known software after all

MedBooster avatar Jun 14 '22 09:06 MedBooster

I've sent another message to their support yesterday. Let's see if I get an answer this time.

BrayanDSO avatar Jun 14 '22 10:06 BrayanDSO

I am lost on a loop of

Your query is not clear to our development team. Would you please describe the issue with more detailed information?

So, I give up reaching their support. If anyone else has the availability/patience to insist on this cause, feel free to do it.

BrayanDSO avatar Jul 14 '22 15:07 BrayanDSO

re-closing as https://github.com/ankidroid/Anki-Android/labels/Stale rather than 'completed'

david-allison avatar Jan 31 '24 16:01 david-allison

We should be able to use: https://github.com/david-allison/S-Pen-Remote-Open-SDK/

david-allison avatar Oct 01 '25 14:10 david-allison

I could use the SDK, but using the air actions configuration seems easier https://developer.samsung.com/galaxy-spen-remote/air-actions.html while also being integrated with the system and more consistent by being triggered by the same movements used in other apps.

edit: okay, I may need to use the SDK to check if the pen is connected

BrayanDSO avatar Nov 27 '25 21:11 BrayanDSO