NOTE: Of late, I have been getting requests for very trivial problems that many of you are facing in your day-to-day work. This blog is not to solve your "project" problems - surely not a "Support" site.
I just love to share my knowledge in my spare time and would appreciate any questions or feedback on the articles and code I have shared. I also do appreciate thought-provoking questions that would lead me to write more articles and share.
But please do not put your day-to-day trivial problems here. Even if you do, you most probably would not get a response here.

Search This Blog


Tuesday, 18 May 2010

Table of contents

Table of Contents:
  1. Android Fundamentals - Jargon Explained
  2. Preliminary Step: Eclipse set up / Create Android Project
  3. Android Explicit Intent Example
  4. Android Implicit Intent Example
  5. Invoking Android Pre-packaged Applications
  6. Fetching a result from a called activity
  7. Android Notifications Example
  8. Android Local Service Example
  9. Android Service and Notification Combined Example
  10. Android Remote Service Example
  11. Android Content Provider Example
  12. Android Broadcast Receiver Example
  13. Android SQLite DB Example
  14. Shared Preferences on Android
  15. Google Maps on Android
  16. Location Manager on Android
  17. Simple List View
  18. Custom List View
  19. Android Threads and Handlers
  20. Http Connection Using Threads
  21. Date Time Picker Views
  22. Auto Complete Text View
  23. Spinner View
  24. Gallery View
  25. Image Switcher View
  26. Creating Android UI Programmatically
  27. Android UI - Inflate from XML (Dynamic UI Creation)
  28. ListView of Data from SQLiteDatabase
  29. TabLayout or Tabbed View
  30. Options Menu
  31. Context Menu
  32. New Contacts Content Provider
  1. Simulating an incoming call on the Emulator
  2. Obtain Google Maps API Key
  3. Simulate Location Change in Android Emulator
  4. Updating to Android SDK 2.1
  5. Delete / Remove Applications deployed on the Android Emulator
  6. Disable Chinese / Japanese Characters on Emulator Keyboard
  7. Android Eclipse link Error - New Project
All Sample code at One place / Alternate Download site for Code


  1. Thanks a lot Sai, these tutorials are amazing!

  2. hi,

    thanks a lot for the amazing tutorials.
    i just wanted to know what are the good tools for GUI design available for android
    the xml editor involves writing large chunks of code which is laborious.
    is there any good drag and drop GUI design software??

    1. Hi,

      You can use droiddraw software
      check this Link.

    2. This comment has been removed by the author.

  3. Hi Sai,
    Thanks for sharing all your valuable knowledge.
    I am facing one issues is that I can't download any of the code.
    It simply opens a blank screen. Is this the problem at my side or the code is removed ?
    Please guide me :)


  4. Hi Ashwin,

    I have not removed the code. But probably that site is blocked by your firewall if you aer trying to access it from your corporate network.

    Have you tried from outside your corporate network and are you still facing the problem, let me know... so that I can check it out.

    1. This comment has been removed by the author.

  5. Hi Sai !
    This is Mohan. Your tutorial is very much helpful and easy to understand.
    I have a doubt regarding "remote DataBase Connectivity". Assuming that I am having a database that stores some student details in a remote server. I want to access that Data Base from my Android for a query. Can you Plz give me some code to demonstrate this issue with a good example ? I will be waiting for your reply.
    -Thanks in Advance.

  6. Hi Sai !
    I am working on a Android Project. I want the background of the button to be transparent, so that I can see the layout background . Can u provide any sample code for solving this issue ? I will be waiting for your reply.
    Thanks in Advance !

  7. yah i tried from outside also.The source code site is not working

  8. hi sai,
    i want to know how to connect to telnet in emulator.i used the code from
    ,i am not able to connect to telnet ,plz help me asap.

    Thanks ,

  9. Hi Sai,

    Thanks a lot for the tutorials. It has helped me a lot.

    Have you worked with Tab Layout? If so, can you post a tutorial on the same.

    Thanks again.

  10. Hi Sai,
    Can you tell me that does android provide any API for to see/delete
    its temp and absolute files.

    And also is it possible to un-delete a deleted file in android.

  11. Hi Sai,
    i am using new ContactContract API to add a contact,but i couldn't find that contact. It stores as a invisible there any solution for this problem?

  12. Hi Sai,
    Thanks a lot for these wonderful tutorials they are all very helpful. I am trying to find out one thing about scrolling, please kindly suggest an idea. I have a horizontal list of buttons which I am scrolling on the screen but I want to make it look like a circular stack, that is the last one should be followed by the first one.
    Any clue is highly appreciated.

  13. hi sai

    thanks a lot for such a nice tutorials.

    can you please post a sample code for remote database connectivity.


  14. hi sai

    i am not able to acees net on the android.Can you provide step by step process of how to configure android to access internet.I have bsnl broadband internet connection on my pc.

  15. Hi,
    I need the sample code for Surface view. I mean, I have to access the image with touch screen as top-bottom, left-right, corners to corner, rotate, zoom in/out, scroll vertical/horizontal etc... done in the same Activity.

    Thanks& Regards

  16. Hi Sai,
    thanks for the superb blogs. Its really helpful.I have one request. Can you please put some light over the activity attributes ?

    Thanks & Regards
    Ashwin Khadgi

  17. Hi Sai,

    I need some help or advice on user authentication for an Android app.

    First time the user starts the app, will be asked to enter credentials. But for any subsequent starting/loading of the app on that phone should not ask the user his credentials, instead the credentials need to be stored on phone and my app should be able to pick those and then send those to my server for authentication.

    Simply, the user enters username and password only first time for the app. From there on., my app need to save those uname and pwd and access next time when the user loads the app. (Just like our email/outlook access from iPhone/Android).

    Currently I do not have any idea on any android for this purpose.

    I would be thankful for any help or idea on the API, or any suggestion on the best approach.


    1. Hi saravan,

      U can use the concept of Shared preference for implementing this........

    2. but can u plz provide source code for how to implement ?

  18. Hi sai,these are great tutorial...
    Can you provide example for webservices in android...plzzz...i want to know how can we do it...plz help.

    Thank you.
    Giri bhushan

  19. Hi SAI,
    I refer ur blog more than android developer site. I am working on Camera part so can u please post tutorial on camera.

    Thank you.

  20. Hi Sai,
    Does Android allows to change the voice of a recorded audio. And can we change the default voice of a caller to man or woman or child,if so let me know.


  21. Hi Sai,

    Thanks, all of your tutorials for helped me..! I am having one doubt, I want to connect remote SQL Server 2008, right now i connect with webservices, is there any other possibile way


  22. is there anyway when using the android webview that i could hide or cover the url address being show when it's loading ???

  23. my email
    need to solve this problem badly


  24. Can you please show the example of puzzle? How to swap images between frame layout? how to find co-ordinates of images?

  25. HI, Is there any way that we change voice of recorded audio and video in android. As there is a soundpool method in android , there we change voice deep voice and chipmunk.. What if I want change recorded voice to male computer voice and female computer voice. Is there any way to implement pitch , key in Android ? .Can we set voice before recording audio ?

    Thanks in advance, Rahul

  26. Is there any method to set pitch , key etc

  27. how to connect android with remote mysql database..
    please help me..

  28. just i need login verification using remote mysql database.... plz help me.. give mercy..

  29. any body know how to connect mysql.. send coding t0 my id

  30. Hello Sai,

    Iam currently working on a video chat App. Just wondering if i could get any sample code on how to start. or can u just give me an idea like where to start... Or any supporting API's... Please reply ASAP.


  31. hi geetha...thanx so much for the tutorials..they actually worked for me...
    i have problem here..i need to develop an application like caller ID spoofing...but as i am new to this technology i don't have any idea how to start with it...i just need a starter...pls guide me

  32. Hi... This is Rahul.

    All the tutorials are great with such a great explanation. Please keep up the good work and share us your knowledge on even more complicated parts of android like OAuth, SSL, AIDL or InterProcess Communication. It would be great for Advanced learners and once again.... Keep up the great work.

  33. Hi,
    I want to implement progress bar.How to do it.

  34. i want to just pass the values of edittext boxes to the server/database.(to a php function) .I want to just call the function by passing the username and password to that function .can u help me how can i do that

  35. Thanks a ton!!! Really all the examples are awesome!! Thanks again!! God Bless U!

  36. Dear Mam,Thanks a lot ,your examples are very helpful.
    once again thanks lot 4 sharing ur knowledge

  37. Hi SaiGeetha,

    i want to know how to create apk by using the ant script.

  38. Hi

    Can v get the mobile location without using GPS.
    And with using Network location can v get the location of a particular number.

  39. Hi Sai,

    Am new to android.I hope you wil help me out. I want to know How to move the imageview from one positoin to another imageview position on the gridview. It should happen by drag and drop. placed on one gridview. I tried to write the code with setonTouchListener..but it is applying for gridview. Please share me some example codes for this...

    Thank you.

  40. Hi Sai,I am beginner in android. Its wonderful blog for beginner.Its give me a great pleasure.Continue your support like it.God Bless You.

    1. Hi Vikram this is Kiran, I am new to Android developing...Could u plz guide me how to learn android step by step( an accurate flow)...more importantly can u mail me important material u have. I appreciate and be grateful for ur help.I need ur support
      My mail id z

  41. Hi Sai,

    Thanks for your tutorials. Its really amazing for the beginner to understand well.

    Can you please write a tutorials something like reminder kind of service which should run even after closing the application?

    Thanks in Advance

  42. Hi,
    How to include barcode reader to application..

  43. Hi Geeta,
    You have provided very useful posts. Concepts are made easy to understand with examples. I ve been refering your articles on android.
    Can you please give us an article on bound service. I cant find any which is as simple as your articles to understand.

  44. Hi Sai,

    I tried the code for Using Camera API. When I execute the code, on android mobile it shows the object rotated by 90 degrees during preview. e.g a vertical object is shown as horizontal. Would u plz tell me why is this happening?

    Thank you,

  45. This comment has been removed by the author.

  46. hi.. i am rajeshkumar, new to android i met the problem,During UI design for all android mobile screen size with diffrent did't fit for all size screens.. can you help me?

    Thank You..

  47. Hey Sai Geetha... kindly upload some thing related to fragments and android 3.0 and above.

  48. crk
    dear you should use either 9path image or instead of setting pixels as px use dp(density independent pixel) in UI ie. in XML

  49. hi sai,
    thanks for this informative blog. its very helpfull to initiate my career with android. now i need to know how to code for editable list view? i have to edit the items in list view. can u give me ur suggestion?

  50. hi sai,
    ur tutorials r excellent and good for beginners of android

  51. Hi,

    I'm new to android

    1)could you please tell me how to access https url through android.

    2) My app which was running fine in 1.6 version upto 2.2, But there is a problem in 2.3.3 as it compresses the data while sending to the server.

    Can u please provide any solution to these.

  52. This comment has been removed by the author.

  53. Hi,
    I Need a small help regarding webviews. i opened url and while navigating the otherpages i didnt face any problem but while navigating a new is opening. I want to close the new window and retain to previous page where i opened new window. i didnt used any javascript code in my program. bydefault i used
    public void onCloseWindow(WebView window) { window.goback();}
    but new window is not closing and going 2 2nd previous page. how can we solve this problem??
    my mail is s.seshu143attherategmaildotcom.

    thanks and regards,

  54. Hello Geetha,

    Thanks for all your posts. Can you write an article on WebDav Client for Android?? I'm trying to connect to WebDav server form Android using Jackrabbit-WebDav. But, I'm unable to connect to server from Android Environment(I'm able to connect from outside Android environment).


  55. hello..
    your post are really very helpful..
    i had to develop an which i ahd to select and copy from webview in my local file ..please help me out..

    thanks you

  56. Your examples are very helpful,thanks for sharing ur knowledge.

  57. Hi Sai, I am following your block very oftenly. All the concepts in this blog are explained clearly. Helped me as an android fresher to have a grip over the subject by learning basic concepts. I would like you to explain concepts on Digital Rights Management(DRM). Looking forward for your reply.

  58. Hi Sai, Many thanks for sharing your knowledge about Android. Your explanations have helped a beginner to start to understand the complexities of the language

  59. drag and drop a button into list view..

  60. hi plz help me...

    How to apply background colour for expandable list view

  61. Hi saigeetha , dhiraj here , i started my android with the help of your tutorials and stil refering it , unknowingly but its true that u are making other's dream come true and making their future ...
    Thanks a lot

  62. Hi saigeetha,
    I am sujith.. Am an MCA student. I wish to do android for my project. And hence i am trying to learn an develop some simple applications.. And of-course ur tutorials really helps me to clear my doubts. A special thanks to u...

    Right now i am trying to make an app which i got in a hurdle. I wanted to make an application which displays an image and a button in the screen. I want to place the button just below the image. And wants to draw lines above the image.

    And i have done almost a 20% of that app. But then i got a problem. For that i am including 2 links which i have asked in StackOverFlow. Just check it, and plz correct/guide me..

    (Plz see my own answer. and correct me if i am wrong)
    Then the result when i had done it is in the link,

    Thanks in advance,

  63. Can you provide few tutorials on Fragments in Android which was introduced in the 3.0 Version HONEYCOMB

  64. Hello mam ,,,
    Can you post an article based on ContentObserver to read the changes in Content DataBase ... its my humble request ... if posible send source code to my mail id .... E-Mail :

  65. Can you provide a tutorial on using cloud as DB and connect it with android?

  66. Sai, Great stuff, very helpful.

    BTW...I think you meant "Tidbits", not "Titbits", above.

  67. Great tutorials mam...can u help me to get strong in Db with simple examples..

  68. No posts on Grid me i will be thankful to you.

  69. Hi Geetha,
    Could you please provide some articles on cocos2d android, it will be more useful and a new concept to all users as it is going to be popular one.

  70. Awesome, your work is so catchable and simple, thank you, kudos!!!

  71. hi geetha,
    Thanks for giving such a nice tutorial can u explain about streaming to wowza server concept. actually i need to record video through camera and save that files to wowza server. can u explain with small example?

  72. Hi madam,
    This is prasad.After reading all the content from your blog .i am pretty comfortable in designing apps in android.Now i want to design 2D and 3D games in android.could you please provide the info. for how to start and design the games in android. Thanks @prasad(

  73. Hi Sai, I refer your blogs to clear my doubts. I want sample example or tutorial on android drm framework.
    Thanks in advance

  74. hi sai,
    Thank you for tutorials. really helpful.

    I would like to request you to write a tutorial on using appengine datastore as a database server for an android app to save and retreive data.

  75. These articles have got complete sense without confusing the readers.
    super one click root

  76. Hai, Sai,

    I i am very fond of your blog and got knowledge by reading your blog concepts.
    Now i am looking for newly integrated concepts like ORMLite , Facebook integration etc.. Could you please, write those articles which are very important......
    Thanks in advance

  77. Gud morning Madam ,
    I need an hint for Android Phone sensing the action of human or car ..... when car is going fast it should able to note speed of the car .... It should give all sensing like if any thing is placed near phone then it should recognise that .... Please help me out

  78. Hi Madam,

    This is Manivannan. After reading all contents from your blog very helpful of my android development.
    I need help from you, i am creating listview using sqlite database its displays value like vertical list, but i want to display the saved values multi column row listview like "name fathername dateofbirth" etc. so pls send me your mail id, i have to send my program to you. please check that code and tell me what will do the next.

    Manivannan C

  79. hello sir,
    i made an app using HTTP connection in that i sent data from android app to MySQL database successfully but am unable to fetch data from MySQL database what to do plz tell me,
    and cant we do that without using json? just want to print data fetched from MySQL in android app plz tell me sir asap i need to complete my project sooner ??

  80. Thank you , it's very helpful for beginners

  81. I refer ur blog more than android developer site.
    Best Dental Clinic

  82. Hi Sai,
    Good tutorial .Thank you so much....

  83. hi
    Nice blog, Can you please put some light on Geofencing in Android since the Google's article is quite complex and lengthy one and there is no other article on that topic as well

  84. Hai mam i want to execute a program about displaying all the phone details can u help me plss .. its very urgent ...
    I dont know how to proceed

  85. Hi mam,
    Nice blog , Can you please put some on POST and GET data using JSON Parsing in android.