Code samples from "Advanced Android Application Development, Fourth Edition"