Android platform engineer on application architecture
Unfortunately, the contents of this post are no surprise to any seasoned Android developer. It&#x27;s very clear the Android engineers haven&#x27;t given a lot of thought to how applications are to be developed.<p>I&#x27;m all for them not enforcing one methodology over another. However, in order to build an Android application (following whatever pattern) we do need core building blocks that have been well thought through on how they will be used.<p>In general performing Async tasks (in particular networking) is excruciatingly convoluted on Android - well, at least to get it right. <i>Many</i> inexperienced Android developers simply get this wrong, and quite frankly I can&#x27;t blame them. Such a common task should be trivial to perform and not require hours of background reading.<p>The issue largely comes down to the fact the &quot;system framework&quot; has been designed to be simple (supposedly[1]) for system framework maintainers, and not developers writing applications. Destroying and recreating activities (so you can load different resources) may be simpler from AOSP&#x27;s perspective, but it&#x27;s not at all logical from the perspective of an application. Sure, there are several ways to work around this, but they&#x27;re all stupidly convoluted.<p><i>Frameworks should be written for consumers, not maintainers.</i><p>[1] Okay, the system frameworks definitely aren&#x27;t actually well designed &#x2F; simple to work with for framework maintainers either, that was just the (missed) goal. If you want to see world&#x27;s worst state machine (a stupid amount of booleans), check-out:
<a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;17847775&#x2F;nested-fragments-illegalstateexception-can-not-perform-this-action-after-onsa" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;17847775&#x2F;nested-fragments...</a>