How can I make my plugin work on mobile devices?
So I have plenty of experience in Java & C# and a bit in JS, but this is my first time ever with Node.js so forgive any ignorance
I made a plugin to encrypt (or at least obfuscate) some selected text. Here is basically how it works:
- The user selects some text and
- inputs a passphrase into a dialog modal
- Passphrase gets hashed,
- and is used (along with generated IV) to encrypt the text.
- selected text is replaced with encryption result
The IV is randomly generated but will be needed later to decrypt, so for now it is just formatted onto the note with the encrypted text.
Here is a demonstration of how the IV is stored with the encrypted text. It is shown in more detail in the ReadMe.
And it works reliably enough on a PC.
However it doesn’t work on Obsidian on my phone (Android app):
The modal appears, and once submitted, it looks like for moment something is happening with the selected text.
So before I start a painstaking Android debugging process - does anyone have a hunch to point me in the right direction? I’m hoping there’s just some alternate API call that works on any device.
Or of possible workarounds I was considering trying different approaches like outputting the result to the clipboard, and notifying the user to paste it where they’d like.
Or if there were just a clean way to get access to the developer console on the Android app it would make things easier.
-
here’s a quick installable release too
The results are the same using a command, but everything here is happening on the single ribbon icon’s click (line 32
) and the resulting functions like the password submission (try on line 87
).