Tutorials and Sample Code
Lists
This section lists, in alphabetical order, separately-housed collections of tutorials and sample code
- anddev.org: large collection of tutorials, grouped by level of experience required (novice vs. advanced)
- Android Snippets: collection of source code snippets, with comments
- Hello Views: from the official Android site, a collection of samples for major GUI widgets and containers
- Learning Android: A site dedicated to creating code tutorials that are both useful and up to date with the current SDK
- SDK Sample Code: online edition of the sample code that accompanies the Android SDK
- A blog on Android Beginner's Tutorials: a step-by-step introduction to android development concepts along with sample code to illustrate each concept separately, in a very simple way
Individual Tutorials and Samples
This section provides links to specific tutorials or sample code snippets, housed on this wiki or elsewhere, grouped into categories for easier navigation.
- Twitter + OAuth: How to do it on Android (tutorial)
Complete Applications
- Hello World: from the official Android site, the canonical "hello, world" application for Android
- Notepad Tutorial: from the official Android site, demonstrates GUI and database access
GUI
- Flattening the Stack: covers issues with stack overflows due to too-deep view hierarchies and how to address them
- Tabs with Intents: basics of using an Intent to put an Activity in a tab of a TabView
- Rotational Forces…On Your Android App: first in a series of blog posts on handling and managing rotation events
- Maps, ItemizedOverlay, and You: quick review of using ItemizedOverlay to display "push-pins" in a MapView
- Fun with Fonts: how to embed TrueType fonts in your application and make use of them
- Flipping Your Views: short overview of using ViewFlipper instead of tabs to put more stuff in a single screen
- Adding Tabs Dynamically: how to add tabs to a TabView at runtime, rather than only up front in layout XML
- Fancy ListViews: first in a very long series of blog posts on how to create ListViews with rows that are more than just plain text (note: mostly written for the M5 SDK, may require some modification)
Database
Services
- Local Service in Android: How to create a local service, invoke a method and stop the service?
- Remote Service: How to create a Remote Service, bind to it, invoke a method on the remote service, unbind and stop the service.
Content Providers
- Working with Content Providers: Sample code to work with the in-built contacts content provider showing create, update, view and delete operations
Miscellaneous APIs
- Wake Up with the Alarm: how to use the AlarmManager and WakeLocks to provide cron-like scheduled code execution for your app
- What's Your Preference: first in a series of blog http://androidguys.com/?p=2038 posts] about creating preference UIs via PreferenceScreen XML
Third-Party Code
- Scripting Your Android Device: how to integrate Beanshell into your Android application
Other Tutorials
- Too Many Bits for DDMS: how to get DDMS to work on 64-bit Linux, specifically Ubuntu
- Layout Problems Redux: HierarchyViewer: review of how to use hierarchyviewer to determine where you are going wrong with your layouts
Latest Code from Android Snippets
page revision: 18, last edited: 12 Oct 2009 06:27