Very Useful Android Java Code Snippets for Beginners: Simple as copy-paste Why reinvent the wheel ?
I wish I had this reference book when I started programming android apps.
Snippet is a programming term for a small region of re-usable source code, machine code, or text. Ordinarily, these are formally-defined operative units to incorporate into larger programming modules.
The android programming snippets are arranged by difficulty level. In almost all cases you need to import what’s not imported already (click over in Eclipse, import class, or alt+enter in InteliJ Studio->import). In some cases the code requires a library to run (mentioned).
You might want to look at permissions that are required for some actions. Setting a wallpaper requires “set wallpaper†permission. I didn’t mention them, since they are easy to spot (you’ll get an error :) with what you should put in the manifest)