News for hackers. Stuff that matters.
Re:Back to Android (For the Time Being) by kelnos on Monday October 10, 2022 @05:43PM (#33156728)
That's actually part of the (intentional?) design of the Android framework underneath. By default, if rotation is allowed, Activities (basically a "UI screen", but not exactly) are destroyed and recreated when the screen is rotated. If the data structures AndFTP uses to manage/track the download are stored in the Activity, then they'll be destroyed on screen rotation as well.

This is something you learn very quickly once you start building Android applications -- or, at least, I did when I started back in 2011 (I haven't done much Android dev in the past decade since then). While I do think this behavior is a pretty terrible default behavior for the underlying UI framework, it's pretty bad that the AndFTP developers have not fixed this bug in their application -- and yes, it is a bug in their application.

The UI development paradigm has changed quite a bit over the life of Android, making "Fragments" more popular to use in some quarters than "Activities" as the "unit of UI screen" (though Fragments are still underpinned by Activities), but I believe the fundamental issue is still there: if you don't explicitly handle rotation properly, and store state in your Activity, it will get destroyed whenever the screen is rotated.

Re:Back to Android (For the Time Being) by white_dragon88 on Monday October 10, 2022 @10:40PM (#33158883)
And THAT is an absolutely moronic design choice. Among many, but that one stands out.