My First Android App

My First Android App

Ive now spent around 24 hrs developing an android app. I downloaded the SDK and Eclipse and for the first time in ages i started to work with Java. I spent quite a bit of time working with C# over the years and to be honest since i started focusing on the android SDK i havent even really noticed the difference. there was zero time needed to adapt back to Java.So my first app – is a NASA image of the day app. Now sharp people out there may know that theres a Headfirst Android Programming book that uses exactly that example, and that was my starting point – but i got lucky because the examples didnt work. The SDK has changed a bit since the book i had was published and NASA have even changed the formats of their RSS feeds. I also went a lot further than they did with the book. The skills i learned for the book

  • Setting up the dev environment
  • Creating an application
  • Downloading RSS
  • Programatically parsing XML
  • Working with the Android UI
  • Working with permissions
  • The basics of Android Architecture

And the stuff i did on top of it:

  • Creating and Binding Android services
  • Rendering Menus + catching those events
  • Creating widgets
  • Executing timed events
  • Saving things in the file system
  • Deploying my app.

I would like to thank Glen for a very late Friday evening working on this – he has significantly more android experience than i do and he helped me understand service binding and some of the key concepts of appication architecture at a time (midnight – 2am) when i was having hassle getting my head around it. We were talking about it on a Skype conversation while he was playing Diablo 3….

I found some fairly cool sensible restrictions as well – at one point i tried to put a 300k image into my widget and got a java out of memory error – which was a bit of a surprise – but the reason it happened was because my image was bigger than the total amount of memory allocated to the screen. That forced me to scale my image – which was a good thing.

Its quite cool to have my first app installed on my phone – though to be honest i probably wont keep it there. My first attempt wasnt really coded to my usual standard and ive learned how better to do things next time.  The important thing is the app worked! I will probably build another app this week.

You can download my app for Android here. Its not perfect but it works!


The Phone Swap

My work phone is now a Galaxy S2 – Ive resisted posting about my change of work phone partially because i didnt want to be seen as making a comment against microsoft – becuase professionally i am an advocate of MS technology – in truth – my previous work phone, the HTC trophy was a fairly ok phone, running WP7 but i was quite relieved when it died of natural causes! I just dont really like the style of WP7 applications or UI although i am sure some people love it.

So now i have the Galazy and ive had my opportunity to take a look at Icecream Sandwhich (its operating system), i have to say i pretty much love it.  My technology is a bit all over the place at the moment. I still love my iPhone 4, its a good piece of kit, with an easy to use robust OS and i love the way that icloud keeps things in sync, but i have to recognise the fact that android is catching up. Reality is with a google account and a dropbox account you can pretty much do most of the things that you can do with iCloud. I downloaded an app for the galaxy S2 to allow me to see and use my iCloud contacts in sync with  the android phone. If Apple dont come up with something pretty special with the iPhone 5 i will probably swap to something else.

As with any new phone and OS combination i have downloaded an SDK and started to look at developing for it – i will post a bit more about my first day of development tomorrow! I know its not the latest Samsung phone – it was a hand me down – Matt left employment at the same time as my phone had started to play up so I just took his, and I am glad i did!!


%d bloggers like this: