Add search template option for "Card Browser" share sheet/menu action on Android

Hi team,

First of all, Ankidroid is such a joy to use. Thank you! I use it on my e-ink device, so it’s amazing to be able to add words to AnkiDroid directly from my device’s reading app via the “Add Card” share sheet action. I was also super excited to see that y’all added the “Card Browser” action that lets you search for the highlighted text. Unfortunately, it’s usability is somewhat limited for me at the moment.

I primarily use Anki for Japanese, but I use a monolingual deck, meaning the definitions are also in Japanese. I also use a Korean deck with Korean words and Japanese definitions. This means, if I just search for a Japanese word, I’m likely to get a bunch of noise because it will find that word in the definitions of dozens of cards, rather than finding the card where it’s on the front. That’s not super useful to me, and it’s only happening because AnkiDroid only searches the term across all decks and doesn’t open the first result. And, I’d love to be able to use Anki basically as my dictionary to look up words I’ve already added!

So, I’d suggest two small improvements, both to the settings:

  1. Let users write a “search template” string in the settings. For example, many people would want “deck:current Front:{{Term}}”. If you could put the tag “{{Term}}” anywhere you want and the default were a plain “{{Term}}” it wouldn’t change the existing behavior but would make the feature a ton more useful.
  2. Add a checkbox called something like “Open first result” which means that, if a result is found, it gets opened immediately rather than showing the whole browser. This is generally the behavior I would want, and I could just use the back button to go to the whole browser when it’s needed.

I really appreciate your consideration of these suggestions and thanks again!