-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Cards info (Review, Lapses, Interval, Due, Queue) in WebView #6393
Conversation
@mikehardy @david-allison-1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment for discussion, other than that, looks good to me.
AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was just us being busy :-), thanks for your patience! Also looks good to me, thanks @infinyte7
Nice feature! Thanks @infinyte7 ! Would it be possible to get the card state info in the same way? #5587 |
Using above the following information of
Other information available can be found here #6307
|
Pull Request template
Purpose / Description
There are Anki addon for getting cards info (Review, Lapses, Interval, Due, Queue). But on AnkiDroid that can not works so this is implementation for getting info in WebView.
Fixes
Fixes #4676
Approach
Added JavascriptInterface to pass value from Java code to WebView
How Has This Been Tested?
Tested on Emulator
Add following to front/back side of cards to get the values (Review, Lapses, Interval, Due, Queue)
Learning (optional, can help others)
https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object,%20java.lang.String)
Checklist
Please, go through these checks before submitting the PR.
if
statements)