News for hackers. Stuff that matters.
Re:Back to Android (For the Time Being) by drewzero1 on Monday October 10, 2022 @02:33PM (#33154896)
I've seen it on older apps and ones I've tried to make myself. The app where it's caused me the most grief is in AndFTP where rotating the screen will kill any in-progress file transfers. I've learned to just lock the screen rotation when I'm using that one, which definitely shouldn't be necessary but also isn't the end of the world.
Re:Back to Android (For the Time Being) by BoorishBears on Monday October 10, 2022 @02:45PM (#33155030)
> The app where it's caused me the most grief is in AndFTP where rotating the screen will kill any in-progress file transfers.

Imagine if every time you resized a window on your PC, the window got killed and restarted, and you see why bugs like that arise.

It'd be one thing if it was when the app is backgrounded, but no, even if you have one app running on your entire device, the UI be torn down.

It's insanity that in 2022 a major operating system is still doing that, and yet here we are with no end in sight.

Re:Back to Android (For the Time Being) by smoldesu on Monday October 10, 2022 @04:15PM (#33155938)
There's a lot of insane things about modern operating systems. For example, some OSes don't even let you buy software without first paying the hardware manufacturer. Crazy stuff, we should really encourage regulators to bring these companies to their knees.
Re:Back to Android (For the Time Being) by BoorishBears on Monday October 10, 2022 @06:48PM (#33157317)
It's certainly crazy if you don't know better. The 48 billion in revenue the Play Store hit last year would tell you that regardless of security policy, people tend to use first party app stores on mobile.

But you know what? Maybe instead we should discourage people from clumsily trying to push their pet agenda the moment their favorite sports team (erm excuse me, Operating System) is painted in a poor light.

But we can't all get what we want can we?

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.