Android Examples With Source Code

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Android Examples with Source Code and Description

Here you can download verities of Android Examples with Source Code. To help you understand some fundamental Android APIs and coding practices, a variety of examples and source code are available along with the Android SDK Manager. Each version of the Android platform available with the SDK Manager offers its own set of sample codes for verities of android applications. Also You can download examples with source code for Android Applications from here. Below is the screen shot from the API Demos application. Once you will click on each category, we will find and run related android apps listed below.

You can find the source code for all samples at this location in your local PC, where you downloaded/extracted “Android SDK”:


The <version> number corresponds to the platform’s API level.

Example: ~\android-sdk-windows\samples\android-8\

In my PC, I have extracted android DK in my E:\ Drive. So sample codes location in my PC is :


You can easily create new Android projects with the downloaded samples, modify them if you’d like, and then run them on an emulator or device.

Note: If you did not install sample codes before with Android SKD, then also you can install now. Follow below steps.

To Download Samples from Web:

  1. Launch the Android SDK Manager.
    • On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.
    • On Mac or Linux, open a terminal to the tools/ directory in the Android SDK, then execute android sdk.
  2. Expand the list of packages for the latest Android platform.
  3. Select and download Samples for SDK.

Note: While trying the above steps, you might face some issues.

Download More than 100 Android Examples with Sample Code in a Single Project

If you are not able to download or find default android sample codes from internet, then don’t worry. You can download all android API sample codes from here. I have uploaded more than 100 android examples with source code inside a single project, Once you download the project from here, then you can find the below list of android Sample codes and examples from that project. You can run each example on Android Emulator or Real Device. Some samples codes might not work in Emulator as they are hardware dependent. But you can run those in real device. You will find below List of Examples with Source Code once you download the project from here. I have sub categorized all sample examples like below. All the below android examples has been build and tested on Android Version 2.2 with SDK Min API Version 8. You can Run on higher Android OS as well.

Before Start downloading all Android Examples with Source Code from here, Please read this post carefully.

Note: All examples has been packaged as different categories in the code. Each package having verities of examples similar to that package as i have explained below. Have a look into below image for better understanding. When you open the project, you will find these packages in the source code.

Download the . Then unzip the downloaded file ( and run on your Emulator/Device. Then check if your required android example is available in this project.

1. App Examples In Android

  • Action Bar Example in Android

  • Activity Example in Android

  • Alram Example in Android

  • Device Admin Example in Android

  • Dialog Example in Android

  • Intents Example in Android

  • Launcher Shortcuts Example in Android

  • Menus Example in Android

  • Notification Example in Android

  • Preferences Example in Android

  • Search Example in Android

  • Services Example in Android

  • Text-To-Speech Example in Android

  • Voice Recognition Example in Android

2. Content  Examples In Android

  • Assets Examples in Android

  • Clipboard Example in Android

  • Provider Example in Android

  • Resources Examples in Android

  • Storage Example in Android

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

3. Media

  • AudioFx

  • Media Player Example in Android

  • VideoView Example in Android

4. OS Examples in Android

  • Morse Code (Vibration) Example in Android

  • Rotation Vector Example in Android

  • Sensors Example in Android

  • SMS Messaging Example in Android

5. Text Examples in Android

  • Linkify Example in Android

  • LogTextBox Example in Android

  • Marquee Example in Android

6. Views Examples in Android

  • Amination Example in Android

  • Auto Complete Example in Android

  • Buttons Example in Android

  • Chronometer Example in Android

  • Controls Example in Android

  • Custom Example in Android

  • Date Widgets Example in Android

  • Expandable Lists Example in Android

  • Focus Example in Android

  • Gallery Example in Android

  • Grid Example in Android

  • ImageButton Example in Android

  • ImageSwitcher Example in Android

  • ImageView Example in Android

  • Layout Animation Example in Android

  • Layouts Example in Android

  • Progress Bar Example in Android

  • Radio Bar Example in Android

  • Rating Bar Example in Android

  • ScrollBars Example in Android

  • Seek Bar Example in Android

  • Spinner Example in Android

  • Tabs Example in Android

  • TextSwitcher Example in Android

  • Visibility Example in Android

  • WebView Example in Android

7. Graphics Examples in Android

  • AlphaBitmap Example in Android

  • AnimateDrawables Example in Android

  • Arcs Example in Android

  • BitmapDecode Example in Android

  • BitmapMesh Example in Android

  • BitmapPixels Example in Android

  • CameraPreview Example in Android

  • Clipping Example in Android

  • ColorMartix Example in Android

  • Compass Example in Android

  • CreateBitmap Example in Android

  • Density Example in Android

  • Drawable Example in Android

  • FingerPaint Example in Android

  • Layers Example in Android

  • MeasureText Example in Android

  • OpenGL ES Example in Android

  • PathEffects Example in Android

  • PathFillTypes Example in Android

  • Patterns Example in Android

  • Pictures Example in Android

  • Points Example in Android

  • PolyTopoly Example in Android

  • PurgeablesBitmaps Example in Android

  • Regions Example in Android

  • RoundRects Example in Android

  • ScaleToFit Example in Android

  • SensorTest Example in Android

  • SurfaceView Overlay Example in Android

  • Sweep Example in Android

  • Text Align Example in Android

  • Touch Paint Example in Android

  • Typefaces Example in Android

  • Unicode Chat Example in Android

  • Vertices Example in Android

  • Xfermodes Example in Android

8. Android Preferences Examples in Android

  • Preferences from XML Example in Android

  • Launching preference Example in Android

  • Preference dependencies Example in Android

  • Default values Example in Android

  • Preference from codes Example in Android

  • Advanced preferences Example in Android

  • Fragment Example in Android

  • Headers Example in Android

9. NFC Examples in Android

  • ForegroundDispatch Example in Android

  • ForegroundNdefPush Example in Android

  • TechFilter Example in Android

10. Animation Examples in Android

  • Bouncing Balls Example in Android

  • Cloning  Balls Example in Android

  • Custom Evaluator Example in Android

  • Default Layout Animations Example in Android

  • Events Example in Android

  • Hide-Show Animations Example in Android

  • Layout Animations Example in Android

  • Loading Example in Android

  • Multiple Properties Example in Android

  • Reversing Example in Android

  • Seeking Example in Android

  • View Flip  Example in Android

Note: To run all above downloaded sample codes, you need  to build the downloaded project in Eclipse and install the apk (ApiDemoes.apk), then you can see all categorized examples on the first page once you run the application on emulator or device.