Anki-Android
Anki-Android copied to clipboard
Add support for profiles
Parallel builds simulate profiles. They don't auto-update, but you can find them:
- Latest Stable https://github.com/ankidroid/anki-android/releases/latest
- Latest Alpha https://github.com/ankidroid/anki-android/releases/
edited by @david-allison
Originally reported on Google Code with ID 1643
Anki 2.0 supports having different profiles for different users.
This also allows a user to split their decks between different collections.
I built a prototype of this and it seems quite simple.
The prototype is based on using different preference files.
Reported by flerda
on 2013-01-26 01:18:26
Great :-)
Reported by nicolas.raoul
on 2013-01-26 05:59:36
- Labels added: Priority-Medium
- Labels removed: Priority-Low, Milestone-Release2.0.1
Reported by nicolas.raoul
on 2013-01-26 06:07:35
- Labels added: Milestone-Release2.1
I'm using this app for myself and for my young son & it would really help to split up
the decks into different profiles so I can keep the alerts and reminders separate.
It's not feasible to have a device set up purely for an account for my son, and giving
him a separate ankiweb account doesn't give me the control I want, as well as being
'another' account to manage.
Hopefully this change would also mean that you could set a different widget for each
profile.
Reported by leejkennedy
on 2014-06-17 21:01:15
Almost two years since the initial comment. Is there a branch with the prototype/WIP
on github or in the wild or anything?
Reported by clayton.hughes
on 2014-10-22 05:45:09
No, there is no branch for this or prototype to look at the moment.
I have put together something quickly to see if it was feasible,
but have not looked at it since.
Reported by flerda
on 2014-10-22 07:08:46
We're currently recommending users who want this feature to do this:
https://code.google.com/p/ankidroid/wiki/FAQ#How_to_use_different_Anki_profiles
Reported by perceptualchaos2
on 2014-10-22 08:35:10
Thanks for the workaround #6. The parallel builds are outside of the store,and so won't
receive regular updates?
#5 I'm confused. Is the prototype lost? You've said twice that it existed, but also
claim that it doesn't (I wasn't asking about a binary, convenient as that would be).
Reported by clayton.hughes
on 2014-10-22 19:54:06
To be honest, I am not sure where the files are at the moment.
I might or might not still have a copy of them. The files were not
checked into github or anything like that.
Anyway, it was not in a state that could be shared: it is based on a mix
of a modified app and some shell scripts, and switching profiles requires
a rooted device and running commands via adb. It was sufficient to prove
that the method I suggested above (based on different preference files)
is feasible, but it is not something that can be actually used, or that I
would like to share at the moment.
An actual implementation would not be based on that implementation
actually, but would probably be done from scratch.
Reported by flerda
on 2014-10-22 20:07:16
Issue 1991 has been merged into this issue.
Reported by Houssam.Salem.Au
on 2015-05-29 03:00:35
We're currently recommending users who want this feature to do this: https://code.google.com/p/ankidroid/wiki/FAQ#How_to_use_different_Anki_profiles
That page no longer exists. Where should we look now?
https://github.com/ankidroid/Anki-Android/wiki/FAQ#how-to-use-different-anki-profiles
On Wed, 29 Jul 2015 at 14:22 MatthiasKauer [email protected] wrote:
We're currently recommending users who want this feature to do this:
https://code.google.com/p/ankidroid/wiki/FAQ#How_to_use_different_Anki_profiles
That page no longer exists. Where should we look now?
— Reply to this email directly or view it on GitHub https://github.com/ankidroid/Anki-Android/issues/2545#issuecomment-125950270 .
I've made a one-time release of 3 parallel builds for v2.5beta16: https://github.com/ankidroid/Anki-Android/releases/tag/v2.5beta16
These will probably not be updated in the future, but I've created a bash script that you can use to easily make your own parallel builds in the future.
For me it is by far the most important missing feature, don't know how to "vote it up"
There isn't a way to vote issues up and open source developers don't tend to work on features based on their popularity anyway (rather on issues that are fun or personally useful for them). If the feature is really important to you, I'd suggest offering a bounty to give developers a financial incentive.
Thanks for the reply, I have in the meantime experimented with your parallel builds and after some struggling made that work. The most (and the only) non-obvious thing being the necessity to change the collection location in each (well, in "n-1") parallel build. I'm willing to pay about 5$ for the parallel builds and another 10 as a thank you for the application, but:
- don't know if it would please you or you would feel offended since it is such a small amount
- don't know how to easily do it (have Paypal, card - have been searching a way for ten minutes now)
@michalpravda
It's not possible to donate directly to AnkiDroid, but if there is a specific feature that you would like to incentivize developers to work on, there are sites where you can set a "bounty". Even if you can only pledge a small amount, others may also pledge something which together could form enough to motivate a developer.
I've never used it before, but https://www.bountysource.com/ appears to be one popular website for doing this.
@timrae are you still interested in merging changes to support multiple profiles in AnkiDroid? I'm going to do a parallel build first (I could do 2 or 3 and publish those as well if there is interest...) but since it would affect UI (for switching) plus lots of storage stuff I don't even want to think much about it if there's no interest...
@Mike Hardy
Yes, definitely interested in merging profile support if done right!
On 12/12/2017 22:26, "Mike Hardy" [email protected] wrote:
@timrae https://github.com/timrae are you still interested in merging changes to support multiple profiles in AnkiDroid? I'm going to do a parallel build first (I could do 2 or 3 and publish those as well if there is interest...) but since it would affect UI (for switching) plus lots of storage stuff I don't even want to think much about it if there's no interest...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankidroid/Anki-Android/issues/2545#issuecomment-351050492, or mute the thread https://github.com/notifications/unsubscribe-auth/ACsA4oirztKuAZXMSYTeiU1ie1u2w_lzks5s_n7tgaJpZM4Fh9-5 .
@Mike Hardy
I'm interested as well. I have three parallel 2.5beta16 on my phone. Used weekly by me and my kids. Would be interested in more up to date parallel builds if the profile feature didn't work out.
2017-12-12 15:07 GMT+01:00 Tim Rae [email protected]:
@Mike Hardy
Yes, definitely interested in merging profile support if done right!
On 12/12/2017 22:26, "Mike Hardy" [email protected] wrote:
@timrae https://github.com/timrae are you still interested in merging changes to support multiple profiles in AnkiDroid? I'm going to do a parallel build first (I could do 2 or 3 and publish those as well if there is interest...) but since it would affect UI (for switching) plus lots of storage stuff I don't even want to think much about it if there's no interest...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/ankidroid/Anki-Android/issues/2545# issuecomment-351050492>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ ACsA4oirztKuAZXMSYTeiU1ie1u2w_lzks5s_n7tgaJpZM4Fh9-5>
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankidroid/Anki-Android/issues/2545#issuecomment-351061188, or mute the thread https://github.com/notifications/unsubscribe-auth/AK0fGgtCUPY6YDZ2FmRe--fs_nPcg2jsks5s_oiugaJpZM4Fh9-5 .
@michalpravda As mentioned I'm first trying to do fresh parallel builds - it's not the most useful work but I'm becoming familiar with mobile development in general and the AnkiDroid codebase specifically at the same time so it's useful for me. Unfortunately I ran into some problems immediately - the parallel builds script had an interaction with the current AndroidStudio build system, and it didn't change the storage directory (leading to confusion others noted). While those were easy then when I built and installed my "AnkiDroid.A" it it didn't work out of the box - as if the startup intent of the system were still referring to "AnkiDroid" instead of "AnkiDroid.A" for instance. My progress is available on a topic branch on my local fork, if any one else has interest as well - my work on it will be pretty intermittent - https://github.com/mikehardy/Anki-Android/tree/parallel1
@mikehardy - I have no experience with mobile development, but I do remember that it took me some time to configure the builds I had received from @TimRae. The problem was that all instances pointed to the same path for storing the collection's data. Once I manually set it to different paths (ankidroid - settings - ?advanced? - ?path to collection? (I use localized version and now just guessing the menu entries)) it began to work flawlessly. Maybe that's your missing piece?!
2017-12-13 17:54 GMT+01:00 Mike Hardy [email protected]:
@michalpravda https://github.com/michalpravda As mentioned I'm first trying to do fresh parallel builds - it's not the most useful work but I'm becoming familiar with mobile development in general and the AnkiDroid codebase specifically at the same time so it's useful for me. Unfortunately I ran into some problems immediately - the parallel builds script had an interaction with current the AndroidStudio build system, it didn't change the storage directory (leading to confusion others noted), and while those were easy then when I installed it it didn't work out of the box - as if some part of the system were still referring to "AnkiDroid" instead of "AnkiDroid.A" for instance. My progress is available on a topic branch on my local fork, if any one else has interest as well - my work on it will be pretty intermittent - https://github.com/mikehardy/ Anki-Android/tree/parallel1
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankidroid/Anki-Android/issues/2545#issuecomment-351452691, or mute the thread https://github.com/notifications/unsubscribe-auth/AK0fGrdc2QYuQqEGysuv_BzfFytnErQWks5tAAFQgaJpZM4Fh9-5 .
Yeah I saw that comment earlier about the confusion there and updated the parallel build script to change that storage directory in each build as well, I'm having some other thing, I'm sure it is basic and Ill learn something...
I don't think that's something we'd want to change upstream in the script, but if it helps you to figure out the code then by all means.
On 14/12/2017 04:19, "Mike Hardy" [email protected] wrote:
Yeah I saw that comment earlier about the confusion there and updated the parallel build script to change that storage directory in each build as well, I'm having some other thing, I'm sure it is basic and Ill learn something...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ankidroid/Anki-Android/issues/2545#issuecomment-351493870, or mute the thread https://github.com/notifications/unsubscribe-auth/ACsA4r_3lntkopxXyDMLfLTcG47AjDRnks5tACM_gaJpZM4Fh9-5 .
Hmm - Looking at the effects of different storage locations will definitely help me figure out persistence as I learn where everything is stored in order to implement separate sync accounts / decks, but I’m curious on the stance of not merging a storage directory change in the parallel builds script upstream - only because I can only think of one use case one would want parallel builds, and that’s to have separate decks etc so that they can simulate different profiles with different users. If (big if) that is the only use case, than it makes sense for the parallel builds to also have parallel storage. But, I could be wrong for a number of reasons - I could be missing a use case, violating principle of least surprise, or simply proposing something that smells bad for reasons I’m unaware
@mikehardy
I can only think of one use case one would want parallel builds, and that’s to have separate decks etc so that they can simulate different profiles with different users
Yes that's a fair assumption, I guess was I just imagining some horrible hack, but it doesn't actually look that difficult to do it properly.
I have created a pull request with the changes from my fork's parallel2 branch that seem to correctly generate backwards-compatible parallel builds with separate storage directories for fresh installs now. I have generated up to date packages on my local fork from this work and made a release of them.
If others are interested in testing up-to-date parallel builds and are willing to accept the consequences of testing untrusted forked alpha code ;-), please check them out: https://github.com/mikehardy/Anki-Android/releases/tag/v2.9alpha16
They aren't perfect but I noted the issues on the release page, and they do work for me.
However, please please do not log any issues or otherwise create any work for @timrae or other real developers as a result of them. They are convenience only for others on this issue, and I'll pull them if they cause any problems whatsoever, or if the main project here doesn't like them
That said, if they work or don't and you have useful feedback I'd be interested to know.
Next up for me is to think about actually implementing multiple profiles.
Future implementation of this should take into account grouping notification channels by profile now that we support channels: #4922
@timrae are you still interested in merging changes to support multiple profiles in AnkiDroid? I'm going to do a parallel build first (I could do 2 or 3 and publish those as well if there is interest...) but since it would affect UI (for switching) plus lots of storage stuff I don't even want to think much about it if there's no interest...
I currently don't use the Android, I just use my laptop. I have 4 kids in the learning to read level, and I would love to be able to use my Android phone reasonably. I tried the parallel build but really didn't try hard due to not quite understanding and decided to wait until it was an official feature, and just use my laptop for now.
And to be honest, my real fear is: If I start using an alternative, and then the project moves on but the 'hack' does not, then it would be very frustrating. So I guess my real fear in trying a hack is that it may be a short term advantage followed by great disappointment. (Consider for example the one person who says he has a working solution, but if people - in other words people I have no control over - cause problems, then he will pull it, and I'll be left in the lurch.)
@madmanpierre I can understand the fear of a rug being pulled from you, but I can say (as the person currently publishing modern parallel releases) that the "hack" really can't matter much. Either it syncs successfully to a separate AnkiWeb account or it doesn't, right? So in the future if it's implemented any other way and sync (one of the key features in this app) works, you'll just re-sync.
The only problem I could see for you is that I only do 3 extra install builds when I generate parallel releases, and you have 4 kids! Maybe I could add one... :-)
Literally all the parallel build is doing is making a separate Android app package name, so you can maintain a separate preference file, then in that preferences you define a separate AnkiDroid directory, thereby keeping your collections separate.
I only have one kid, but I use it for exactly this case.
Thanks Mike. If you could add one more that would be nice ! Lots of useless but MAYBE interesting info:
I've been using Anki personally for over 10 years (and did give my cash donation, it was well worth it). I've been using it for learning French, Spanish, computer commands and every other misc 'minor' thing I want to memorize. I have 10's of thousands of cards in my active decks. (and I have them all intermixed by grouping the decks to review, I find it helps get my learning solid when it jumps between French, Spanish, Linux, Windows, Misc Facts etc.., during my, normally 30 minute a day period, adding about 5 'facts to memorize' a day.)
My wife and I are foster parents. We have had 4 kids in our care for several years (all since birth), the oldest is grade 1, the youngest a couple years behind, the youngest ones wanted to use the 'same thing' that my grade one daughter is using to learn how to read.
In my kid's case, the front and back of cards are identical because I am the arbitrator of whether they have read and understood (there/their, by/bye etc..,) the word correctly. But it is SO nice to let Anki worry about the timing of the cards - so much better than flash cards.
As a specific for how good it was. My 6 year old was working with Mom and adult big sister for almost a month and, using flash cards, had learned to read only two words by sight. I offered to take over, put all the sight words into Anki, and my daughter learned 40 words in less than a week, and has been learning now at 4x's the rate the school is asking for - and she uses (with me) Anki only about 5 minutes a day, been doing it for a month now, and she has never made a mistake on a word after it gets left for 7 days, so I KNOW she is learning them solid.
So … if that motivates you to add a 4th extra build … I assure you the facts are all true! In any event, over the holidays I'll set up at least the 3 extras then and feel comfortable sitting on the rug. Thanks.