Added preview button to anki...need to test .apk

212 views
Skip to first unread message

Chris Gonzales

unread,
Sep 10, 2013, 3:28:19 AM9/10/13
to anki-a...@googlegroups.com
Hey all:

I hired a freelancer to add a preview button to the card browser: https://www.freelancer.com/projects/Mobile-Phone-Android/Preview-button-for-Ankidroid-App.html

Anyhow, the developer says he is almost done and would like me to test; however,  I have not yet migrated over to android from ios.  Can someone test and provide feedback.  Will post link to .apk when I get it.  Most likely in the next 24hrs. 

Chris 

Nicolas Raoul

unread,
Sep 10, 2013, 3:40:52 AM9/10/13
to anki-android
Hi Chris,

I can try it, but you are probably more aware of the expectations, so how about you also test it, using the Android emulator?
http://developer.android.com/tools/devices/emulator.html

It is not really difficult to install and use, if you have any question just ask here or at http://android.stackexchange.com

Cheers, and thanks for the initiative! :-)
Nicolas Raoul


--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chris Gonzales

unread,
Sep 10, 2013, 11:56:14 AM9/10/13
to anki-a...@googlegroups.com
Nicolas:

Thanks for you reply. Attached is the link to the .apk.   I will install the emulator.

Chris
DeckPicker.apk

Chris Gonzales

unread,
Sep 10, 2013, 4:22:51 PM9/10/13
to anki-a...@googlegroups.com
Was able to get the program running with emulator, which is painfully slow.  I go this image when using preview button with Nexus 7 on 4.3 https://dl.dropboxusercontent.com/u/13184157/Capture.PNG

Not sure what you saw.  Anyhow let the developer know that.  Told him he was on right track as what I want as far as preview button is basic functionality that will show the text and images. 

Let me know.

Chris

On Tuesday, September 10, 2013 12:40:52 AM UTC-7, Nicolas Raoul wrote:

Nicolas Raoul

unread,
Sep 10, 2013, 11:46:06 PM9/10/13
to anki-android
Looks like he is on the right track indeed, and now needs to call the part of AnkiDroid that is in charge of rendering cards.
For instance methods displayCardQuestion and displayCardAnswer in Reviewer.java I guess.
Cheers!
Nicolas Raoul

Chris Gonzales

unread,
Sep 11, 2013, 11:58:02 AM9/11/13
to anki-a...@googlegroups.com
Hey All: 

Here is the latest version for anyone that would like to test it and give some feedback: 
My first comment is that preview shouldn't change a card's scheduling information. 
Other comments?

Chris


Chris Gonzales

unread,
Sep 12, 2013, 9:07:05 PM9/12/13
to anki-a...@googlegroups.com

Nicolas Raoul

unread,
Sep 12, 2013, 9:13:30 PM9/12/13
to anki-android
Hi Chris,
I just tried this APK, but I can't find the preview feature... how to see a preview, step-by-step?
Thanks!
Nicolas Raoul


Chris Gonzales

unread,
Sep 12, 2013, 10:38:11 PM9/12/13
to anki-a...@googlegroups.com
Nicolas:

Interesting.  I just installed on a Galaxy S3 and the preview button wasn't there in the deck browser, but then it suddenly appeared after  opening and closing a couple cards.  Ill let him know.  The other problem I saw was that the back side of the card is no longer preview-able.  Thanks for checking. 

Chris


--
You received this message because you are subscribed to a topic in the Google Groups "AnkiDroid" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/anki-android/Cp0hsdivOpU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anki-android...@googlegroups.com.
DeckPicker.apk

Nicolas Raoul

unread,
Sep 13, 2013, 12:07:55 AM9/13/13
to anki-android
A bigger problem: I am no longer able to review.
Whenever I try to review, I get the "congratulations no more cards for today" message.

Now I tried to open a few cards, and finally saw the "Preview" button.
It works but only shows the front, not the back, as far as I can see.

Another problem:
- Preview a card on deck1
- Come back to the decks list, open deck2
- Click "Start reviewing" on deck2
- Review starts... with deck1. It seems to be an undesirable side-effect of preview.

Cheers!
Nicolas Raoul

Chris Gonzales

unread,
Sep 13, 2013, 12:36:38 AM9/13/13
to anki-a...@googlegroups.com
Nicolas:

I forwarded your comments.  Thanks for looking into it. 

Chris

Chris Gonzales

unread,
Sep 13, 2013, 2:24:10 PM9/13/13
to anki-a...@googlegroups.com
So far things are looking a lot better.  It crashed on my when I pressed the preview button in Add menu when no card was present.  Will have to try on a physical device.  I have just attached the latest. - Chris 
DeckPicker.apk

Nicolas Raoul

unread,
Sep 15, 2013, 11:49:57 PM9/15/13
to anki-android
About the previous APK: I realized that it has corrupted my collection.
I am now trying to recover my decks via backups.

Cheers!
Nicolas Raoul

Chris Gonzales

unread,
Sep 16, 2013, 10:28:26 PM9/16/13
to anki-a...@googlegroups.com
Nicolas: 

Sorry again about your decks.  If you're still up for alpha testing, this deck is the latest.   It seems fairly stable compared with the previous ones.  Always the problem is tracking down a friend with an android phone when I want to run a more thorough run through.

Chris
freelancer.apkg

Tim

unread,
Nov 6, 2013, 1:11:26 AM11/6/13
to anki-a...@googlegroups.com
Any progress on this? Are you willing to commit the freelancer's code into the 2.1 development branch?

Chris Gonzales

unread,
Nov 6, 2013, 2:03:31 PM11/6/13
to anki-a...@googlegroups.com
Tim:

The developer gave me the completed program but dropped off the map before giving me the code; maybe he was unwilling.   I have tried recently to get back to him and will let you know if is in contact.  However if you want to use the preview button for the time being here is the APK:

It has been working nicely on my phone.  The only issue that creates problems that I noticed was your card settings will influence how the preview function works.  So I recommend using a max image width of 100% and setting height to auto.   

Chris

Tim

unread,
Nov 6, 2013, 2:19:12 PM11/6/13
to anki-a...@googlegroups.com
I see, it's unfortunate if receiving the source was not part of your agreement, since if it's not committed into the main branch then you won't be able to benefit from future updates to AnkiDroid.
Please do your best to get the source code, although I guess in the worst case it could be possible to decompile the APK.

Flavio Lerda

unread,
Nov 7, 2013, 3:32:07 AM11/7/13
to anki-a...@googlegroups.com
Hello Chris,

If the person who wrote the code tells you that they are not willing to release it, you can
remind them that they are legally obligated to do so by the fact that AnkiDroid's source
code is licensed under GPL, no matter what your prior agreement with them is.

Without the source code, it is probably not going to be useful in the longer term or to a
large audience: there have been already some recent changes to LaTeX, siblings and the
sync protocol, which that version might not be able to take advantage of.

Flavio

Flavio Lerda

unread,
Nov 13, 2013, 7:10:55 AM11/13/13
to anki-a...@googlegroups.com
Hello,

We received a pull request:

I am not sure if this is coming from the person you asked to implement the preview button feature.
The pull request does not actually contain any of the code but the only change from him or her
which is not really doing much.

I followed up on the pull request, but have not yet heard back.

Flavio

Tim

unread,
Feb 16, 2014, 11:51:36 PM2/16/14
to anki-a...@googlegroups.com
Flavio, I see the developer never followed through with this, but I just went through his github and found his source code in a different repository; it does indeed appear to be the same freelancer.com developer "Jolta Tech".
Unfortunately he just uploaded his project code as is, without any commit history, so it will need to be manually merged, but it seems relatively straightforward:

Most of the code is in a new file PreviewClass.java, and there are some changes to his CardEditor.java to show the preview button as well. 
Comparing his CardEditor.java with the last commit from Kostas (2.0.1 version I think), it's clear there are some additional differences in his file unrelated to the preview button, but probably you are familiar enough with the code to extract his contributions and then perhaps you could make a new pull request from your own github account so that this work doesn't lost?

Flavio Lerda

unread,
Feb 17, 2014, 7:34:42 PM2/17/14
to anki-android
​Thanks Tim for finding where the code is!

I would rather try to get in touch with him ​first and see if he is willing to submit the code himself.
​But it is good the code is not lost! Merging it should not be too much work. I am busy for the next
few weeks with work, but I can try to have a look at it once I get some time.

Flavio​

To unsubscribe from this group and stop receiving emails from it, send an email to anki-android+unsubscribe@googlegroups.com.

Tim

unread,
Feb 18, 2014, 12:53:22 AM2/18/14
to anki-a...@googlegroups.com
Well I think it might be asking a bit much of the freelancer to go through the hassle of manually merging and submitting a clean commit from the state that it's in now, since he doesn't appear to be so familiar with git/github...
So I've gone through and done it myself and tested that it's working (I thought it was going to require a deeper knowledge of Android than it actually did). I've put it up on my github; should I submit a pull request, or do you want to try contacting the developer first?

End users can download a binary from here, which should be less buggy than the previously released one (which I think is based on 2.0)
To unsubscribe from this group and stop receiving emails from it, send an email to anki-android...@googlegroups.com.

Tim

unread,
Feb 18, 2014, 10:21:43 PM2/18/14
to anki-a...@googlegroups.com
OK I submitted a pull request after talking to Nicolas:

Flavio Lerda

unread,
Feb 19, 2014, 5:15:48 AM2/19/14
to anki-a...@googlegroups.com
Thanks Tim for taking case of this!

My intention was mostly just to ask the developer his intentions about the code.

I would recommend anyone who plans to pay a freelancer to write code for AnkiDroid to make it a requirement that the job is not complete unless the code is merged into the AnkiDroid repository: without that one would have a fork of AnkiDroid with the feature requested, but, unless it is merged, one will have either to stop receiving updates to AnkiDroid or will lose the feature in the next update.

Flavio
To view this discussion on the web visit https://groups.google.com/d/msgid/anki-android/304b74f0-1566-4c8a-a3d3-973a3ae9486b%40googlegroups.com.

Nicolas Raoul

unread,
Feb 19, 2014, 6:14:10 AM2/19/14
to anki-android
On the other hand, requiring a merge creates a great risk for the developer: the risk that all maintainers are busy with other things.
I have sent valid (I think) patches to many projects and sometimes they just stay unmerged forever. It is difficult to know in advance whether a patch will get merged quickly or not.

So, while it is a good idea, it requires that the freelancer knows us and trusts that we will merge promptly.

To help get a bit of that trust, I created a wiki paragraph describing the process:
http://code.google.com/p/ankidroid/wiki/Contribution#How_to_sponsor_development
Feel free to edit (or ask us to edit if you don't have wiki access)!

Cheers!
Nicolas Raoul

chajadan

unread,
Mar 23, 2014, 8:32:42 PM3/23/14
to anki-a...@googlegroups.com
I believe this bug is related to this thread, and only occurs with night mode enabled: Card Previewer -- text does not render against black background of night mode
Reply all
Reply to author
Forward
0 new messages