android icon indicating copy to clipboard operation
android copied to clipboard

Make the download button actually work

Open KentoNishi opened this issue 4 years ago • 7 comments

Maybe provide functions for downloading text files and going fullscreen as native js interface methods?

KentoNishi avatar Aug 11 '21 17:08 KentoNishi

For fullscreen, I can implement a JS interface method to toggle that.

For downloading stuff, would it pass strings of text to a JS interface method?

arkon avatar Aug 11 '21 21:08 arkon

For downloading text, I can just pass the string value (with newlines already included). For screenshots I can send a base64 encoded image url

KentoNishi avatar Aug 11 '21 21:08 KentoNishi

Stubs for toggling fullscreen and downloading text added here: https://github.com/LiveTL/android/commit/05c8dc4c6211caf4524c650cab0face7511978e0

Let me know if the arguments aren't what you expected.

I'll follow up later on sharing images in #23.

arkon avatar Aug 11 '21 21:08 arkon

Perfect, I'll add it later

KentoNishi avatar Aug 11 '21 22:08 KentoNishi

@arkon small request: make toggleFullscreen accept no arguments. passing the boolean means tracking the FS state in the extension code rather than just triggering a toggle and that requires communicating FS exit events and such, so it would be much easier if it were just the toggle func. i'll implement it with that assumption in develop

KentoNishi avatar Aug 12 '21 06:08 KentoNishi

forgot another request: make the download text function accept the filename as the second parameter

KentoNishi avatar Aug 12 '21 06:08 KentoNishi

Interface changes are done, and fullscreen toggling is hooked up (although not tested).

arkon avatar Aug 14 '21 16:08 arkon

No longer relevant since not trying to use the extension anymore.

arkon avatar May 18 '24 22:05 arkon