Hacker News new | ask | show | jobs
by Zigurd 4803 days ago
"While in Android or iOS your application is suspended when you switch to another one"

That's not correct. Android has multi-processing. The Android runtime enables Service components to run in the background, and has preemptive thread scheduling, and has had these features throughout all publicly released versions of Android.

1 comments

In my experience, Android multitasking still doesn't work like a desktop (or even my old n900.) Certain applications (those registered as services) can continue to work in the background, but many suspend entirely.

Sometimes I want to do something else while I wait for a large web page to load over my mobile data connection. On my n900 this worked fine, but as soon as I switch to another task, Chrome on Android 4.2.2 quits loading the page.

Plus, task switching is still a heavy operation on Android - swapping back and forth between two applications is a bulky, slow operation compared to the n900, which, itself, was bulky and slow compared to a desktop window manager.

You may be executing code on the UI thread. Take a look at Loader for a construct designed to preserve state across component lifecycle events: http://developer.android.com/guide/components/loaders.html