Weylus icon indicating copy to clipboard operation
Weylus copied to clipboard

Native android app

Open fischer-felix opened this issue 2 years ago • 4 comments

Hi, I am playing with the thought of making a native android app for weylus, so things like this can be easily prevented and to (hopefully ?) achieve better performance/latency.

I am pretty new to rust, so I was wondering if there is basically a way to make the app a drop-in replacement (i.e. it just sends the input data to the web server and gets the video feed from it).

Do you think this would be feasible?

fischer-felix avatar Jan 10 '22 20:01 fischer-felix

This is absolutely feasible, you only need a decent websockets library. See this python example on how to get the video feed: https://github.com/H-M-H/Weylus/issues/87#issuecomment-850481361. All other available messages can be found in https://github.com/H-M-H/Weylus/blob/master/src/protocol.rs, Rust is not needed to create a client. See https://github.com/H-M-H/Weylus/blob/67500d87769c9b9c1acc87ebd1c15488d0c7a3d2/ts/lib.ts#L772 for how messages can be handled on the client side and see invocations of websocket.send to see how messages are sent back to the server.

But please note that I haven't spent any thoughts on keeping the protocol compatible across versions as of now server and client are always in sync and I can make breaking changes whenever I like.

H-M-H avatar Jan 10 '22 22:01 H-M-H

I'd love to see this, as this appears to be the only way to support the button (e.g., extremely useful as eraser, or to switch between tools such as textmarker and pen) on the Samsung S-Pen.

kno10 avatar Mar 14 '22 13:03 kno10

I've noticed that not all browsers support all features, and it's tricky to find a single browser that has all features, so a native app would also be extremely useful for that. I've opened #178 to try to find what's the best browser.

MicaelJarniac avatar Aug 10 '22 03:08 MicaelJarniac

Has anybody considered a React Native app? But I'm not sure if it supports pen events, maybe that would require native modules

FedericoAmura avatar Sep 06 '22 13:09 FedericoAmura