aspose file tools
The moose likes Android and the fly likes Exit the Application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Exit the Application" Watch "Exit the Application" New topic
Author

Exit the Application

prazannag Kumar
Greenhorn

Joined: Feb 25, 2010
Posts: 12
Activity can be closed using the method finish(). In which method is used to exit the application completely.
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1355

prazannag Kumar wrote:which method is used to exit the application completely.

"How to exit an application?" has been a topic of debate. Generally, you are advised to not provide an option to quit the application. For a more detailed answer take a look at : Quitting an Application: Is that frowned upon?

This message was edited 1 time. Last update was at by Monu Tripathi



[List of FAQs] | [Android FAQ] | [My Blog]
Piyush Patel
Ranch Hand

Joined: Feb 24, 2009
Posts: 127



[My Blog] [ Follow @Twitter] | Innovations never goes out of Style...
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1355

finish();
System.exit(0).

Though you can call System.exit() to terminate the JVM instance, you should not do it.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 11740

When you exit an activity, an event fires that notifies you to put away all your toys. So you can release all the resources that would otherwise subtract from your overall abilities.

Releasing the activity code itself and the internal structures that support it is a different matter. The main reason why mobile apps are "continuously running" is that with the fairly limited processing power of many mobile CPUs, it's much faster to resume an app than to launch it. And Android, for one, has received its fair share of criticism (unjustified, I think) for being slow.

The other reason for not shutting down an app is that mobile apps tend to be more in the nature of resources to be tapped (such as the phone book display). As opposed to sit-down-and-work-with-it sessions, such as desktop word processing. So it's preferable that they be light and easy to both bring up and put away.


A lot the of modern-day software development platforms are designed to permit parcelling out work to those with the best aptitude for it. A lot of modern-day business is predicated on making one person do all the work, regardless of aptitude.
 
 
subject: Exit the Application
 
jQuery in Action, 2nd edition