Robustness

In the same vein as compatibility support, applications should be designed and tested for robustness. Following are a few tips to help ensure robustness:

■ Use the Android libraries before Java libraries. Android libraries are constructed specifically for embedded devices and cover many of the requirements needed in an application. For the other cases, Java libraries are included. However, for cases where either can be used, the Android library is best.

■ Take care of memory allocation. Initialize variables. Try to reuse objects rather than reallocate.This speeds up application execution and avoids excessive use of garbage collection. Memory allocations can be tracked using the Dalvik Debug Monitor Server (DDMS) tool as discussed in Chapter 12,"Debugging."

■ Utilize the LogCat tool for debugging and check for warnings or errors as also discussed in Chapter 12.

■ Test thoroughly, including different environments and devices if possible.

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment