Documente Academic
Documente Profesional
Documente Cultură
Home
About us
Contact us
Privacy Policy
Tutorials
Gadgets
Internet
Technologies
1/29
15/07/2015
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. You can go through my article Some Common
Android Development Errors and Solutions.
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 dont 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.
http://techblogon.com/android-examples-with-source-code-download/
2/29
15/07/2015
Download the APIDemos_apk.zip from here . Then unzip the downloaded file (APIDemos_apk.zip) and
run on your Emulator/Device. Then check if your required android example is available in this project.
3/29
15/07/2015
4/29
15/07/2015
3. Media
AudioFx
Media Player Example in Android
VideoView Example in Android
http://techblogon.com/android-examples-with-source-code-download/
5/29
15/07/2015
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
http://techblogon.com/android-examples-with-source-code-download/
6/29
15/07/2015
http://techblogon.com/android-examples-with-source-code-download/
7/29
15/07/2015
8/29
15/07/2015
http://techblogon.com/android-examples-with-source-code-download/
9/29
15/07/2015
10/29
15/07/2015
11/29
15/07/2015
12/29
15/07/2015
http://techblogon.com/android-examples-with-source-code-download/
13/29
15/07/2015
14/29
15/07/2015
Download all above Examples with source codes in a single project from Here.
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.
http://techblogon.com/android-examples-with-source-code-download/
15/29
15/07/2015
C ONNECT
activity sample code in android, android application source code, android examples source code, android
examples source code for begginers, android gui examples, android GUI sample code, android sample codes,
android source code, intent sample code in android, service sample code in android
2.
http://techblogon.com/android-examples-with-source-code-download/
16/29
15/07/2015
sustecha says:
April 13, 2013 at 6:52 am
hello, thanks for your rich example but i have a problem on running app, cause when i am starting to run ,
the package made errors, and stop loading the emulator , need a help , hope to use it
Reply
SmrutiRanjan says:
April 13, 2013 at 1:01 pm
http://techblogon.com/android-examples-with-source-code-download/
17/29
15/07/2015
Dear Sustecha,
You might try: First start the emulator and then install your app.
If then also facing the same issue, then look at your DDMS logs, you can find exactly what is going
wrong.
Reply
4.
krishn says:
April 14, 2013 at 4:07 am
how can i vibration phone when i call and when call end.
Reply
SmrutiRanjan says:
April 16, 2013 at 4:02 pm
Goto section 4, you will find the vibration code. Download the code and enjoy.
You need to register a broadcast receiver for call end and call start, then call end. then call vibration
API.
4. OS Examples in Android
Morse Code (Vibration) Example in Android
// Vibrate your mobile phone
Vibrator vib = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
vib.vibrate(2000);
Reply
5.
geogeo says:
April 16, 2013 at 12:02 pm
Thanks a lot . U help me to begin
Reply
6.
Karan says:
April 18, 2013 at 4:58 am
Hello! SmrutiRanjan.
Nice post. Very useful.
Can please post an example on Multiple Screen Support.
Reply
7.
http://techblogon.com/android-examples-with-source-code-download/
18/29
15/07/2015
Hello SmrutiRanjan, I have a problem If you help me , am thankful . I have sqlite date base. And 2
tables. Cities and Offices
Tabel 1 :CitID,CitName
Table 2 :OffID,CitID,OffName and have created db.class and city.xml n my xml file I have 2 spinner .
spinner_1,spinner_2
I can load to spinner_1 ,Cities and spinner_2 Offices. But want , when selected spinner1 for ex. select
Kln, spinner2 will load officces for ex Office A, Office B . How can I do this ? Can you send example
for my problem. Do you have open source code ? Help me , please. Thank you very much for your help.
Reply
8.
Lalith says:
April 19, 2013 at 5:42 am
Hi Ranjan
I am new to Eclipse. can you show me how to install the apk (ApiDemoes.apk)to eclipe.
Thank you
Lalith
Reply
SmrutiRanjan says:
April 19, 2013 at 11:52 am
To install ApiDemoes.apk into device or emilator is very easy.
You need to use adb command.
adb install Example:
adb install C:\hellowWorld.apk
More details link below link for where to get abd tool and how to use it.
Link:
http://techblogon.com/adb-commands-for-android-development/
Reply
9.
Kowshik R says:
April 22, 2013 at 9:18 am
Hi sir,
I need source code for android default browser, so please can you help me.
Thank you
Reply
http://techblogon.com/android-examples-with-source-code-download/
19/29
15/07/2015
SmrutiRanjan says:
April 22, 2013 at 12:47 pm
Default browser means? do you want to open the default browser or want to know the name of the
default browser?
Reply
Kowshik R says:
April 26, 2013 at 11:21 am
Sir,
i need code for web browser ie(code for bookmarks, code for cookies, and code to save
the sessions), pls help me sir, i have to submit my project within may 23rd.
Thank you.
Reply
10.
11.
K says:
April 25, 2013 at 1:55 pm
the source files (Android-Sample-Codes-with-Examples.zip) provide a lot less samples than the apk does
(ApiDemos_apk.zip)
Reply
SmrutiRanjan says:
April 26, 2013 at 12:08 pm
I have checked , all samples are included in the source code
Reply
12.
madhavi says:
April 26, 2013 at 9:41 am
hai iam working on sms receved notifications i need to display sms on new screen
case1:
if i get one sms i click the notification bar and notification bar launches new scree in that my msg will be
http://techblogon.com/android-examples-with-source-code-download/
20/29
15/07/2015
displayed
if i get one message iam able to disply one messge on new screen
but if i get more than two messages i am displaying only latest messge on new screen ,one message is
vanishing(wrong coding).(means iam displaying latestmessge on new screen if i get 2 messges.i lossing to
display 2 messegs.
similary if get 3 ,0r more its happeninh like this
pls help me thanks in andvance
i posted my prob in many sites no one is replied the coreect
how can i resolve my issue
Reply
13.
Kowshik R says:
April 26, 2013 at 2:36 pm
Sir,
i need code for web browser ie(code for bookmarks, code for cookies, and code to save the sessions),
pls help me sir, i have to submit my project within may 23rd.
Thank you.
Reply
14.
Terry says:
April 28, 2013 at 11:14 am
hi brother
i want the all sources codes of apidemos.apk because the apidemos_all.zip only contain apidemos.apk .i
am a beginner and i am very interesting in Android .thank this page is very useful
please help me.
Reply
SmrutiRanjan says:
April 29, 2013 at 4:37 pm
Dear Terry
I have uploaded all source code just below the post.
Have a look again.
Reply
15.
Aykudint says:
April 28, 2013 at 11:07 pm
Thank you very much for your help and comments
http://techblogon.com/android-examples-with-source-code-download/
21/29
15/07/2015
Reply
16.
mouaiyad says:
May 8, 2013 at 2:50 pm
error : INSTALL_FAILD_OLDER_SDK
Reply
17.
18.
ravi says:
May 12, 2013 at 6:32 am
please give me some sample code for GPS tracking for this layout
Reply
19.
ravi says:
May 12, 2013 at 6:37 am
How to store selected spinner value in the SQLITE database like selected country,state etc please give
me some example for this sir..
I am searching from last four days for this sir but i didnt found any where
http://techblogon.com/android-examples-with-source-code-download/
22/29
15/07/2015
Reply
20.
nani says:
May 13, 2013 at 4:57 am
hi sir,
how to save number of images into video format(sdcard images into one video file), image to video
converting. plz help me.
Reply
21.
Partha says:
May 20, 2013 at 11:18 am
Hi,
I have installed all sdk,eclipse.But when i try to run emulator.exe, nothing is happening and emulator is not
launching.
Can you suggest what is the problem here?
Thanks
Partha
Reply
SmrutiRanjan says:
May 20, 2013 at 11:38 am
It takes some time to launch.
Goto Taskmanager and see if emulator.exe is there or not. if found emulator.exe, just close the
process and start again.
It will take some time (10-15 max) for first time.
Reply
22.
Partha says:
May 20, 2013 at 11:42 am
OK
Let me try once.
Thanks
Partha
Reply
http://techblogon.com/android-examples-with-source-code-download/
23/29
15/07/2015
23.
raja says:
May 20, 2013 at 4:52 pm
hai sir
I am new to android.
plz send me some projects with source code
That will help me to put a project into resume(am a fresher).
thank you
Reply
24.
25.
indu says:
May 27, 2013 at 1:40 am
Hi I want to Create a math flash card app using a spinner can you help on it with some samples
Reply
26.
Ravikumar S says:
May 30, 2013 at 8:35 am
Hello Sir,
i am developing an app where image tagging is needed, m confused that how to start. Please help me i
want to develop it as same as markers in maps.
Reply
27.
Swapnil says:
June 10, 2013 at 11:35 am
Hi SmrutiRanjan sir,
http://techblogon.com/android-examples-with-source-code-download/
24/29
15/07/2015
29.
30.
harish says:
August 3, 2013 at 11:25 am
there is an error in ForgroungService.java
setForground(true); The method setForeground(boolean) is undefined for the type ForegroundService
Reply
31.
Jason says:
August 19, 2013 at 3:30 am
Hi sir,
Can sir teach me how to develop a Password Manager application in android?
http://techblogon.com/android-examples-with-source-code-download/
25/29
15/07/2015
I am new
Reply
32.
Rajeev says:
August 19, 2013 at 10:40 am
Nice dude. .
Just now i hv downloaded that file, i didnt check wheather it is working. . but before that i want to thank
you, bcoz it will be very useful for me as well as lot of peoples. .
Great Job. .
Reply
33.
Vengateswaran says:
August 28, 2013 at 4:31 pm
Thank you so much, i am new to android, when running your sample code i am getting below two
errors.
The method setForeground(boolean) is undefined for the type ForegroundService in
ForegroundService.java and the method is stopForegroundCompat and startForegroundCompat.
Can you please give a solution for this
Reply
SmrutiRanjan says:
August 29, 2013 at 8:11 am
just commented the function setForeground(boolean)
Reply
34.
http://techblogon.com/android-examples-with-source-code-download/
26/29
15/07/2015
Thanks
Reply
35.
Anand says:
September 24, 2013 at 9:59 am
Thank you for your useful Api demosonce again thanks dude
Reply
36.
justin says:
October 16, 2013 at 8:23 pm
Do you happen to have anything fro add to favorites or bookmarking articles
Reply
Leave a Reply
Your email address will not be published. Required fields are marked *
Name *
Email *
Website
two = 4
Comment
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym
title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del
datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" dataurl=""> <span class="" title="" data-url="">
Post Comment
http://techblogon.com/android-examples-with-source-code-download/
27/29
15/07/2015
Search
Techblogon
Follow
+1
+ 305
Like 1,859 people like this. Be the first of your friends.
10
Recommend on Google
Follow @techblogon
RSS Feed
Google Plus
Archives
March 2015
July 2014
April 2014
October 2013
August 2013
July 2013
http://techblogon.com/android-examples-with-source-code-download/
28/29
15/07/2015
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
Categories
Android
Android Tutorial
Design Patterns
Displays
E-Commerce
Gadgets
Google
Internet
Mobile Phones
Softwares
Technologies
Tutorials
Windows
Pages
About us
Contact us
Privacy Policy
Meta
Log in
Entries RSS
Comments RSS
WordPress.org
2015 Techblogon
http://techblogon.com/android-examples-with-source-code-download/
29/29