Course Details

Previous Page

Defensive Programming in Android: Network Access and Java Defensive Techniques

Target Audience
Expected Duration
Lesson Objectives
Course Number

Defensive Programming in Android uses coding practices and techniques to create apps that are reliable and resilient. This course will teach you some language-specific Java techniques that promote defensive programming when creating Android apps, as well as how to access the network in Android apps in a way that does not affect user experience.

Target Audience
Android developers who have experience creating apps using Java, and who want to employ defensive programming techniques


Expected Duration (hours)

Lesson Objectives

Defensive Programming in Android: Network Access and Java Defensive Techniques

  • start the course
  • initialize instances of classes safely
  • check for the presence of null to avoid errors
  • design setters to avoid potential errors
  • recognize how to compare two objects in Java avoiding potential errors
  • work safely with the Java switch and case statements
  • use atomic and nonatomic operations in threaded applications
  • use final properties to minimize potential for errors
  • recognize when to use mutable and immutable classes
  • implement a basic enum in Java
  • use enums to reduce the possibility of unexpected input
  • implement an enum with a constructor and recognize the rules for enum constructors
  • implement an interface in an enum
  • create an enum with abstract methods
  • use packages and classes to implement proper encapsulation
  • import packages in Java Android apps
  • use different scopes to implement defensive programming
  • create APKs to run on Android devices
  • create jars for exporting Java code between apps
  • recognize the importance of maintaining a good user experience while accessing the network
  • use AsyncTask to retrieve data asynchronously and preserve user experience
  • use progress reporting to enhance user experience
  • cache retrieved data to enhance user experience
  • transfer large files in the background
  • check network connectivity status in Android apps
  • sanitize data transferred across the network
  • create an Android app to access the network asynchronously
  • Course Number: