Tip

Android applications with data input do not need to follow the typical web form template (data fields plus Submit and Cancel buttons). Instead, data can be saved as the user inputs each field, thus simplifying the user interface and the onPause() method. You should provide a button for Cancel, but Save can be implicit.

The Activity can also save state information to Activity-specific preferences, or application-wide preferences.We talk more about preferences in Chapter 10.

The Activity needs to perform anything in the onPause() method quickly. The new foreground Activity is not started until the onPause() method returns.

I Warning

Generally speaking, any resources and data retrieved in the onResume() method should be released in the onPause() method. If they aren't, there is a chance that these resources can't be cleanly released if the process is terminated.

Was this article helpful?

0 0
Easy Software Profits

Easy Software Profits

Here's How Anyone Can Start, Build and Run their Own Successful Software Empire Without Knowing the First Thing About Programming, Scripting Or Any 'Coder' Stuff. There is no doubt about it software sells. Software has a high percieved value and it solves problems for people.  A claim that can't always be made for PDF books, Video products and the like.

Get My Free Ebook


Post a comment