Vocabulary dictionary

Kanji dictionary

Grammar dictionary

Sentence lookup

test
 

Forums - Support to launch the App via URL-Scheme?

Top > renshuu.org > iOS renshuu



avatar
Heals
Level: 31

Hi,

I apologise if this was aksed and answered before - I tried searching but to no avail.

Does the Renshuu iOS App have an url-scheme that can be used to open the app from other apps like Scriptable, Widgey or a link in a browser?

As an example - Lingodeer registers 'com.lingodeer://' as URL-Scheme and if I type that in Safari it will open up Lingodeer.
This is incredibly usefull if you want to allow launching an application from things like a Widgey Widget or from tools like Scriptable.

In the likely case this isn't possible (yet), all that would be required is this little bit in the Info.plist of Renshuu which would allow anyone to open the application using 'org.renshuu://' as URL-Scheme:

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>org.renshuu</string>
    </array>
  </dict>
</array>

3
1 year ago
avatar

Neat idea. Would it still be possible to use the website using safari if this was implemented?

1
1 year ago
avatar
Heals
Level: 31

Neat idea. Would it still be possible to use the website using safari if this was implemented?

Oh yes absolutely - it doesn't interfere with the https:// Address in any way it simply tells iOS "If someone wants to open an URL that uses 'org.renshuu://' as Protokol then the Renshuu app can handle this" and then opens the app.

A lot of apps also parse whatever URL parameters the user passes along and allow apps to interact that way (for example see the URl-Actions Fantastical offers)


3
1 year ago
avatar
マイコー
Level: 342

It's an interesting idea, and something I may be able to implement in the future. This is the first time I've had a request for something along these lines, although to be honest, I'd like to see more visible requesting for something like this before I put time into implementing it.

3
1 year ago
avatar
Tealtime
Level: 235

I second a desire for this feature! Just tried to hookup Renshuu URL lookups in my AnkiDroid Kaishi 1.5k deck, and ended up here.
I love Renshuu's community driven mnemonics and would love to quickly check them while on Anki.

Right now I have it setup to lookup on Jisho kao_cry.png

1
10 days ago
avatar
マイコー
Level: 342

Thanks for bringing it up - I need to make some other changes to iOS sometime this summer - I can probably add this in then.

What kind of actions would you want to see supported?

2
10 days ago
avatar
Tealtime
Level: 235

マイコー、こんにちは!
Full disclosure I am by no means an informed person in the art of URL lookup stuff. I found out about them very recently.
Also I realize now that this is an IOS thread, which is a detail I missed earlier. I'm using an Android phone currently and can not speak for IOS. I don't know if that's even relevant though for reasons I will explain below (Unordered Bullets #1).

Actions to Support

If you're looking for specific actions that I would like to use personally, these would be my two actions:

  1. Search on Vocabulary Dictionary / "Words" Tab as the default option.
  2. Search on Kanji Dictionary / "Kanji" Tab.

As for Grammar and Sentences, I think that would be more complicated and better reserved for a "Part 2" if at all.

For these items I believe the following should be important:

  • The URL schema should be identical for IOS, Android, PC, etc.
    • This is because if say two people on different platforms download the same AnkiWeb deck with URL lookups, they would both work fine.
  • The URL schema should be documented so Users can find it. (Maybe "Resources" > "Tool" or "Renshuu API")
  • I personally wouldn't use this but I know supporting Unicode values for Kanji is important for some people, just depends on their use case.

Useful Reference

As for the actual URL schema, I think Chase Colburn's Kanji Study app's documentation could be a good developer reference for that (Mobile App Only):
(I'll provide just the relevant ones here for brevity, this is from Kanji Study App's "Settings" > "About" > "Linking Options" menu.)

=Search screen=

kanjistudy://search?q=freedom  (where q (or query) is the url encoded search criteria.)

=Kanji info screen=

kanjistudy://info?code=23383   (where code is the unicode value for the kanji character.)
kanjistudy://info?kanji=     (where kanji is the character literal)

Obviously the scheme would change to "renshuu://" or something similar.

My apologies in advance if it's improper to directly reference someone else's work, or anything like that, it's just a good example that I found in the wild and what led me down this path in the first place.

What I do now

To actually use this (kanjistudy + jisho depending on platform) I currently have an Anki card format as such:

HTML Back Template:

<a class="android-only-link" href="kanjistudy://search?q={{Word}}" target="_blank">
    {{furigana:Word Furigana}}
</a>

<a class="desktop-only-link" href="https://jisho.org/search/{{Word}}%20" target="_blank">
    {{furigana:Word Furigana}}
</a>

CSS Styling:

/* If PC show only PC link */
.android-only-link { display: none; }
.desktop-only-link { display: inline-block; }

/* If Mobile show only Mobile link */
.android .android-only-link { display: inline-block; }
.android .desktop-only-link { display: none; }
1
9 days ago
avatar
マイコー
Level: 342

Gotcha, thanks!


2
9 days ago
Getting the posts




Top > renshuu.org > iOS renshuu


Loading the list
Lv.

Sorry, there was an error on renshuu! If it's OK, please describe what you were doing. This will help us fix the issue.

Characters to show:





Use your mouse or finger to write characters in the box.
■ Katakana ■ Hiragana