Hi,

On Wed, Oct 12, 2011 at 3:12 AM, Steve Sharrock <[email protected]> wrote:

> If the Activity is interrupted by the user pressing the device's "Home"
> button, is the Activity process killed immediately, including the threads
> that may be waiting for Web Service call returns?


No, things aren't killed right away, your threads should continue to run.
Having said that, it's a really bad idea to not pause your work when the
application is paused by the system. Your application needs to be done in a
way that everything can be interrupted as fast as possible. You're running
on devices with low power and limited resources, you need to release things
quickly and efficiently so you won't kill your users battery or the device's
performance (which is the fastest way to get uninstalled).


> If so, is there some way
> to define a "critical region" that can't be interrupted? I've figured out
> how to block the "Back Button"; but I can't do much about "Home" or things
> like incoming phone calls interrupting the current Activity.
>

You should implement the methods available in the activity, like OnPause,
OnResume and others, to track what's being requested of your activity and
pause things accordingly.


> Trying to "Save State" at the Activity/Application level to include
> interrupted thread-waiting Activities really seems like a lot of work. I
> hope I haven't created a monster by following the documentation on Web
> Service calls.
>

Saving state on mobile applications is one of the most important things you
need to consider in your design. Even though your app can technically run in
the background, there's no reason to believe it won't be killed at any time
by the system or the user.

Detailed testing by button-pushing (non-developer) testers is producing some
> ugly errors having to do with synchronization. Any help is greatly
> appreciated.
>

No one said it was going to be easy :)

Good luck!

andreia
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to