Is there a way to easily deactivate an application? The only way I know how to truly deactivate an application is to hit the back button until I get to the main screen.
Right now my app has several pages and if I want to close it I have to hit the back button over and over again.
Is there a way in code that I can just deactivate it?
I’m afraid not – there’s no clean way of forcing an app to exit.
You could throw an exception, of course – but that’s far from clean, and may prevent your app from being approved.
It’s a somewhat bizarre state of affairs IMO, and I wouldn’t be surprised to see it change over time – but for the moment, that’s all there is.
(That means if your app has an EULA, you can’t even have a “decline” button… the only way the user can exit is by hitting back/start/search.)