Mobile Phone Handheld Hardware Hardware Rick Rogers John Lombardo O'Reilly Media, Inc. O'Reilly Media Android Application Development, 1st Edition7.4. Clean Up for ReleaseIf you're like most developers, your path to completing your
application was not linear. You tried some things, kept some, stopped
using others, put in diagnostics when things didn't work quite right,
named some things that you later wished you'd named differently, and so
forth. Now is the time to clean all that up. Once your application is out
in the real world, you'll have to support this version, and it would be
good for you if the code were as clean as possible: Turn off debug and logging code. You don't really want your
deployed application eating up precious mobile phone storage by
generating logfiles, and the user won't
be able to understand your debug messages anyway. If you
haven't already, create a boolean to switch them off and leave them
off for now. And remove android:debuggable=true
from the AndroidManifest.xml file (see
the earlier example) to make sure debug is turned off. Clean up your code wherever possible. Make the naming
consistent, reorder methods in some reasonable way, and try to improve
readability. Even if you're the next person to look at it, you won't
remember what you did six months from now. Remove any test data that you included—particularly anything
that's private or proprietary (like your name and address in a
Contacts database). Delete any extraneous files from the project: old logfiles,
source files that you no longer include in the application,
etc.
 |
|
|
|
|