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.

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

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

Miscellaneous APIs

Third-Party Code

Other Tutorials


Latest Code from Android Snippets

free shipping Moncler coats

1280280360|%e %b %Y, %H:%M %Z|agohover

In the cold winter, if you want to have a good sleep, Moncler knows what to do for that. You must know, Moncler jackets available in fashionable designs and styles, Moncler coats will give you a warm and pleasant winter. Moncler vest is one of the most luxurious Vests in ...

How to tell COACH

1280217000|%e %b %Y, %H:%M %Z|agohover

COACH is different from other international brand, continue to adhere to the high cost of handmade, also continues to introduce high quality raw materials, the COACH has been in leather practicality and durability for itself, in the traditional and popular, and maintain a balance between the price level, is very ...

Executing a HTTP GET request easily with HttpClient & a fluent builder

1275926160|%e %b %Y, %H:%M %Z|agohover

This code executes a GET request using the fluent builder for the org.apache.http.client.HttpClient

Open URL in android

1275299460|%e %b %Y, %H:%M %Z|agohover

To open the url in android

Download an HTTP file to SDcard with progress notification

1274784660|%e %b %Y, %H:%M %Z|agohover

I'm not the original author of this code. It was found here: http://chrischurchwell.com/.../android-download-file-from-internet-to-sd-card-with-progress-report/. Unfortunately, the website seems down as from 25/05/2010.

If you're the author and would like me to do something about this (remove, edit, whatever) please contact me.

I thought this ...

Get the phone SDK version

1274422980|%e %b %Y, %H:%M %Z|agohover

Get the Android SDK version running on the phone.

Transfer file over FTP (close ui and get return code)

1274213760|%e %b %Y, %H:%M %Z|agohover

You can download some files from FTP server and close activity after transfer. You can also get a return code in Intent to know if transfer has been completed, failed or cancelled.

Customizing the Options Menu Background

1273640820|%e %b %Y, %H:%M %Z|agohover

The default options menu can be customized to have the background you wish for.

Courtesy : Sébastien Tardif

Obtain IP address of current device

1271411460|%e %b %Y, %H:%M %Z|agohover

I'm adding this here on behalf of Damian as I think it's quite useful. The author's post is here: http://damianflannery.wordpress.com/2010/03/28/obtaining-your-ip-address-on-android/

Calculate Age

1271059260|%e %b %Y, %H:%M %Z|agohover

self explanatory

Page tags: samples tutorials
page_revision: 18, last_edited: 1255328822|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License