reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
897 stars 87 forks source link

Add mobile support #108

Open Oscar-21 opened 2 years ago

Oscar-21 commented 2 years ago

Is your feature request related to a problem? Please describe. Plugin isn't supported on mobile devices.

Describe the solution you'd like I'd like to have feature parity on mobile. If that's not possible, I'd like a working mobile version with as many of the core features supported as possible.

Additional context I'd like to help with this if it's a feature you're willing to implement. I've done some preliminary research and it looks like there are some options available.

  1. AnkiDroid (Android) exposes a Javascript API. There is also a lower level api that's undocumented but they provide sample apps that use it and links to the relevant source code. I have not researched too deeply on this but I think these would be using custom URL Schemes
  2. Ankimobile (IOS) exposes a url scheme: anki:// I believe Obsidian mobile is built with CapacitorJS, which is itself a mobile version of electron, it appears they both support custom URL schemes.
  3. Another option is to use the AnkiWeb API. This option (for card creation) is text only and doesn't support complicated card creation. The API isn't documented but it could be easily reverse engineered.
github-actions[bot] commented 2 years ago

Thank you for taking the time to report the issue and help me to make the project better! 🙂

reuseman commented 2 years ago

@Oscar-21 I do not know how much is needed by the rest of the people in general. Personally, I just use it on the desktop because it's more comfortable for me. But of course, I understand that there could be interested people like you and indeed it would be a cool feature to have.

In the last period, I could not work on the project, but in the next months whenever I will have a bit of free time I am going to look at the issues in depth. In general, I am totally open to pull requests, and if you are interested in developing these features I would really appreciate it.

From a technical perspective, I would prefer the first and second option rather than using the third one, because it would not give a full and proper experience. In general, there is even a big refactor to do before working on this because it's quite a huge feature that will impact even the current mechanism for desktops. So if you want to do the development, it would be great to have a kind of agreement on the parts that need to be modified and on the interfaces before doing the code part.

Oscar-21 commented 2 years ago

@reuseman Ok, great. I agree the first and second options would be better. I'll start working on this. Would like to discuss anything in particular before I start researching/working on this? Or would you prefer to use a PR as the starting point for any discussions?

reuseman commented 2 years ago

@Oscar-21 we can talk in a PR, so we can better track the rationale

brucey2343 commented 1 month ago

Hi!

Did you make any progress with this? I see there's still no mobile support