[Android] Flaming Durtles - Android app with offline support

Firstly, this app is really useful. Thanks!

I found a bug or something: Recently I had to adjust the clock because of DST and now my reviews are 1 hour late.
On Wanikani website, reviews are available, but not on the Flaming Durtles, on which will be available 1 hour later :laughing:

Ah yes, Iā€™m sure this was going to happen to someone for the DST switchoverā€¦ If your schedule is now 1 hour late, then that means you did not correctly set the DST or time zone for your device. Your phone may be displaying what looks like the correct time to you, but either your DST or time zone settings are now incorrect, so your GMT/UTC offset is now off by one hour and behind the scenes your clock is one hour off.

Make sure your time zone and DST settings are correct, and I strongly urge you to let your device set its own time automatically to prevent this from happening again. When you do that, your schedule in the app will be good again.

2 Likes

Hello, I found a bug, I have no idea what causes it, so I did my reviews, 72 to be exact, I had 20 minutes, I had delay processing quiz results enabled, when I finished them, I got the recap, and pressed finish, the app went to the the main menu, started counting down the reviews, but only did 4 then just closed, opening it again, just showed me 68 reviews pending, I waited a bit hoping to see it start going down by magic, but you can guess how that went

I just let out a ā€œIā€™m going to kill myselfā€ then went back to work, needless to say I immediatly disabled the delay.

Maybe having a backup of the reviews in case something goes horribly wrong would be a good idea

Sorry to hear you lost those reviews, that kind of thing sucksā€¦

The backup actually exists already. All the session information and review results are stored in the database so a crash canā€™t wipe them out. Only when delayed processing is enabled, there is a tiny gap while finishing the session where the results are transferred from the session to the background tasks. Your crash must have happened just in that tiny gap. With delayed processing disabled, you canā€™t lose more than 1 review result that way.

Iā€™m very curious to know why the app crashed at exactly that moment, though. The part where the gap exists is very stable code by now, and there isnā€™t a lot that can go wrong there since I wrote that code very defensively. To help me look into this, could you try uploading your debug log (last option in the settings)? Hopefully I can see what happened then.

In the mean time, Iā€™ll see if I can do something to close that gap. Itā€™s not an easy fix, but itā€™s probably worthwhile to do.

1 Like

It happens, could have been worse I guess lol, I sent the debug log, I hope youā€™ll get an idea of what went wrong and maybe save the life of someone else lol, other than that the app is still great with all these options, and that dark mode which helps not burn my eyes in the morning :smiley:

1 Like

Thanks, I got the log. Can you tell me approximately at what time the crash happened? Nearest hour or something is close enough.

At around 18h30 ehhh maybe timezones are a thingā€¦ 4 hours ago and 10 minutes ago :stuck_out_tongue:

my two cents on this point - the gap is actually not that small. it is not a problem, but for me, this gap is several seconds (upto 10; thatā€™s with huawei p20 pro) and it is possible to start another session in succession while the counter of ā€˜to-be-sent-to-serverā€™ items is not zero - and it gives not-yet-sent items again.

maybe use something like journaling, with several states?

Itā€™s not that simple, unfortunately. This is an orchestration between two database tables, three threads and an in-memory data structure. One of the threads is not allowed to talk to the database, and the two other threads are not allowed to talk to the in-memory data structure. The only way for the threads to communicatie is via message passing between them, and the crash happened at a time when one thread thought it had passed on all of its messages, but the receiving thread hadnā€™t actually received them yet (just 4 out of 72).

The easy fix is for the UI thread to wait for confirmed delivery of the messages, but in Android making the UI thread wait for a background thread is just about the worst sin you can commitā€¦

1 Like

No worries, the log uses your local time. I can confirm the crash happened during the gap I mentioned, but I canā€™t see what caused it, unfortunately. All I can see is it happened while the app was syncing the first review result to the WK servers. The crash must have been caused either by the UI code or by an external source outside of the app.

But at least I know enough to know that the gap is worth closing, so Iā€™ll work on that. As a workaround, keeping delayed processing disabled for now is probably a good idea. Even though the odds of this happening again are probably quite small.

2 Likes

I met the same issue this morning. I am using an Android phone, with the date and time automatically synchronized by the carrier.
The symptom is that 9:15, the timeline still displayS the 8:00 slot.

Is it only the label on the timeline chart thatā€™s wrong, or are reviews actually coming in late?

If itā€™s just the labels on the chart that are wrong, that will automatically fix itself as soon as Android informs the app about the new timezone/DST setting, and the next hour rolls around. If for some reason the app doesnā€™t get informed, you should be able to force the update by force-quitting the app, but Iā€™ve yet to see this actually be a problem in Android.

As long as your date/time is set correctly (and if you have date/time sync enabled that should be fine), then the app will function correctly since internally the app doesnā€™t care at all about timezones, and always uses absolute (GMT/UTC/Zulu) time. The only places in the app where timezones matter are the labeling of the timeline bar chart, and the timestamps shown at the bottom of the subject info dump.

If the reviews are actually coming in late, then Iā€™m afraid I have the same answer for you that I gave to Jontz: your device time is off by an hour, despite what your carrier may tell you or what the device clock shows for you. Maybe I can give you a hint where the problem is if you tell me what your timezone and DST settings look like, but there is nothing I can do to fix it since itā€™s in device settings.

Thanks. Now, the timeline looks exactly the same as on my desktop, so i guess the issue disappeared.

I dont think my reviews have been coming in late, contrarily to Jontz.

Just sharing my love (again) for Flaming Durtles! Itā€™s made my Wanikani life so much easier, getting fast levels in thanks to being able to review while Iā€™m out and about, the offine mode is awesome :heart:

That happened because my smartphone automatically set DST, but DST was officially cancelled in my country xDDD

I had to set the clock manually.

1 Like

Can you set the timezone on your device to a country that is -1 hour compared to you, or another country that has the same GMT offset but doesnā€™t observe DST? For example, Iā€™m on GMT+1 (or GMT+2 during DST), and if I wanted to not observe DST I could for example set my timezone to Algiers (also GMT+1, but no DST) or London (GMT+0 but does observe DST). That way the time would still be correct, the clock would still show the right time for you, and apps that need accurate timekeeping can continue to work.

The real solution is to pester the device manufacturer for an update to the timezone database, but in the Android world thatā€™s easier said than doneā€¦

1 Like

Iā€™ll do that. Thank you!

Hi! I noticed that the kanji 勧 shows up as č¦³ in otsutome font. Iā€™m not sure about the other ones though

Thanks a lot for the app, itā€™s been a pleasure to use it :yellow_heart:

Thank you very much for the app! Very very cool.

Just 2 things, and forgive me if I sound stupid:

  1. is there a way to use predictive text when answering english meanings? It works on the WK website but for some reason wonā€™t work on the app.

  2. on the WK website, when you answer a meaning and if there are multiple, it pauses and allows you to see the other meanings before going to the next question. Is there a way to enable that on the app?

Again thank you for all the hard work. :slight_smile:

Setting ā†’ Keyboard input settings ā†’ Allow keyboard auto-correct for meaning
ā€“ set this to enable

Settings ā†’ Lesson/review settings ā†’ Enable lightning mode
ā€“ set this one to disabled state

You may also want to check values for
ā€“ Action for ā€œclose enoughā€ answer
ā€“ Show info dump .after ā€¦ answer

2 Likes