View Single Post
Old 01-06-2021, 10:27 AM   #8
pazos
cosiņeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by arooni View Post
with tasker there is a way to capture more spen actions and map them to things; but I'm not sure how I could send koreader a keycode FROM tasker. maybe that's possible

reference: https://www.xda-developers.com/custo...re-tasker/amp/
Nope, it is not possible.

Apps are isolated and that's a good thing. We don't want external apps injecting events to KOReader context.

It is still possible to interface with 3rd party apps, but is a rather complex issue as:

1. in order to not to expose most users that aren't aware of such feature that behaviour would be on a different apk, signed with the same key, that communicates with KOReader apk using AIDL

2. The 2nd apk would need to expose a custom permission (lets call it KOReader-inject-input).

3. All clients that want to interact with KO and inject input events in a KO context would need to add that permission to their manifests

4. Apps with that permission granted would be able to bind to the service provided in the application context, and send events, that our plugin would receive and send to the core app, that would schedule them in the input queue, so they can be consumed by the frontend logic of KO.

Note that all of that are fun concepts to play with in the theoretical level but a PITA to implement for such a meaningless feature.

For less money than a SPen you can build yourself a "magic gesture" input device with a 3-axis accelerometer, a bluetooth module and some microcontroller. That input device would code air gestures as input events and send them via bluetooth. It sounds funnier, at least to me
pazos is offline   Reply With Quote