Pages

Saturday, August 21, 2010

Beginning Android

The word “Android” had been buzzing since quite a while now. However I realized the power and beauty of it only when I saw my friend’s Google Nexus one phone (Not sure why they stopped it, probably it was just for Demo :D ) and finally ended up buying an entry level Android phone , HTC Tattoo for experimenting. It has been a couple of weeks I began writing Android apps code for Hello World and finally got an idea of the programming framework after writing a simple app.


I also started following Android developer blog in my Google reader
I started with Hello World Example in official Android developer’s website. It was quite easy with the Eclipse plug-in. Then I went on to explore the Layouts and UI elements.It has a similarity with Adobe Flex programming that we can create fixed UI objects in main.xml like we do in .mxml file in Flex. Also we can create these elements dynamically in program code (Java) like we do in Action Script in case of flex programming.
 
qrcode
Finally I ran the app in emulator and when it ran successfully, in no time I exported the app in .APK file and  transferred it to my Phone using QR code generator, installed and tested.  You can scan the QR code in the left using the bar code reader app of your android phone to input the URL of the app file to the phone. For installing, of course I had to change phone setting to allow non-market apps.
This app contains an input text box where you can type partial company name like “Reliance” or “TATA” and hit the “Search” button and it will pop up a list ticker symbols of all the companies listed in Indian stock exchanges with than name,  if your phone is connected to WI-FI , GPRS, EDGE or 3G. Then if you touch on any of the symbols in the list it will populate the text box with the same symbol. Now you can press the “Go” Button and after sometime it will fetch the current price of the Stock in INR and display below the text box. Email me at neil [AT] neilghosh  [DOT] com or comment bellow to get the Java source code.
My colleague Jake has been writing some good posts in his blog http://theappslab.com/ about android as well.



Here are some useful links I found while developing app for the 1st time
Please add interesting links in the comment of this post if you come across any .

25 comments:

  1. Cool! I understand perfectly when you say you realized the power and the beauty after seeing the nexus one. This is exactly what I felt when I saw yours.

    ReplyDelete
  2. Alosh, now mine is outdated , its the era of "WildFire" :D

    ReplyDelete
  3. hey there, this may be little offtopic, but i'm hosting my website on hostgator and they will suspend my hosting in 4days, so i would like to ask you which hosting do you use or recommend?

    ReplyDelete
  4. Hello,
    the link "Example of HTTP GET Request using HttpClient in Android"
    At runtime the code you suggested I have the following error:

    WARN/System.err(442): java.net.UnknownHostException: www.google.com
    WARN/System.err(442): at java.net.InetAddress.lookupHostByName(InetAddress.java:513)
    WARN/System.err(442): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278)
    WARN/System.err(442): at java.net.InetAddress.getAllByName(InetAddress.java:242)
    WARN/System.err(442): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
    WARN/System.err(442): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    WARN/System.err(442): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    WARN/System.err(442): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
    WARN/System.err(442): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
    WARN/System.err(442): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    WARN/System.err(442): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    WARN/System.err(442): at myProjectAndroid.HttpThread.connectHttpGet(HttpThread.java:59)
    WARN/System.err(442): at myProjectAndroid.HttpThread.run(HttpThread.java:94)
    My emulator is connected to the Internet

    Thank you for your response

    ReplyDelete
  5. Did you try fetching any other sites ?

    ReplyDelete
  6. Apple now has Rhapsody as an app, which is a great start, but it is currently hampered by the inability to store locally on your iPod, and has a dismal 64kbps bit rate. If this changes, then it will somewhat negate this advantage for the Zune, but the 10 songs per month will still be a big plus in Zune Pass' favor.

    ReplyDelete
  7. Wonderful post, thanks for discussing the data. It isn't too often that you study an article where the poster understands what they are running a blog regarding. Sentence structure and spelling are spot on too, only difficulty I seemed to have had been mentioning the site, appeared slow. Appears like additional site visitors experienced the same difficulty?

    ReplyDelete
  8. Utterly written subject matter, Really enjoyed looking through .

    ReplyDelete
  9. Then again, it does find relatively sizzling hot inside Donlon in the top floor coverings (it is typically super damp during the warm months) thus ensure that you obtain a enthusiast! Be certain to don’t burn up fat free popcorn inside microwave-the completely developing has been cleared several times by reason of

    ReplyDelete
  10. ok then i have to ask somethink else different. Is there any way to this extra options ? what did you think about it, thanks for your answers and comments too.

    ReplyDelete
  11. I simply wanted to send a small note to be able to express gratitude to you for all of the fabulous recommendations you are showing at this site. My incredibly long internet investigation has now been paid with extremely good insight to share with my family. I 'd say that many of us readers are very endowed to be in a good site with very many perfect professionals with insightful points. I feel quite fortunate to have discovered your entire weblog and look forward to really more amazing times reading here. Thanks a lot again for everything.

    ReplyDelete
  12. Online web directory. Supplement your situation to our directory object of free. Do not get rid of the entries setakowa.

    ReplyDelete
  13. Online spider's web directory. Add your purlieus to our directory after free. Do not remove the entries setakowa.

    ReplyDelete
  14. Good day! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us beneficial information to work on. You have done a extraordinary job!

    ReplyDelete
  15. Hello there, I found your site via Google while looking for a related topic, your web site came up, it looks great. I have bookmarked it in my google bookmarks.

    ReplyDelete
  16. Online snare directory. Add your area to our directory for free. Do not wipe the entries setakowa.

    ReplyDelete
  17. I was recommended this blog by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my problem. You're incredible! Thanks!

    ReplyDelete
  18. I think other website proprietors should take this site as an model, very clean and good user pleasant style .

    ReplyDelete
  19. Online net directory. Supplement your site to our directory after free. Do not get rid of the entries setakowa.

    ReplyDelete
  20. This particular can be a good web site. Excellent fresh user interface as well as good educational weblogs. We will probably be returning soon, thanks for the great blog. Even though these types of possess a strap to keep child within place even though you're changing all of them, you ought to in no way child unattended if the mat just isn't strapped to anything.

    ReplyDelete
  21. Incredibly cialis maintained and respected trap directory. Rid entry and moderation. Add your connection and you wish intuit the power of our directory. setakowa.

    ReplyDelete
  22. I am not rattling good with English but I line up this really easy to translate.

    ReplyDelete
  23. We Acquire Any,No Equity Homes! We Take About Payments!

    ReplyDelete