Tuesday, July 10, 2012

Hello android world

It's been a few days since I started building an android mobile app.

Unfortunately, I don't have much to show for it.  After starting up the IDE, the android emulator, and my super simple program, I found the program to be ridiculously slow.  The emulator took a few minutes, my computer lagged, and then warning messages of low memory sprung up.  This led me to a detour, where I eventually resized the partitions on my computer (who knows if it even helped the performance on this 5 year old laptop).

After dinner, I'll give it another try.  I'll restart the emulator, and, if God is willing, I will see those two magical words that confirmed I've written a working program -- Hello World !

Update:  I've finally gotten my hello world program to work.  
I'll need to refine this development process, but I think the plan of attack is best done via these steps:
1. Start emulator [from command line probably is best, but I've been doing it from eclipse].
2. Go eat dinner, have coffee, and then check if the emulator is up and running [it takes a few minutes on my home laptop].
3. Open eclipse. Build a clean project. Run the project using the emulator that is running.
I hope iterative development will involve a somewhat simple procedure of making code changes, building, re-starting the app, and not something insane like restarting the emulator.

Update: Using a real phone is fast.
After developing with the emulator for a while, I decided to plug in my Samsung Galaxy Nexus phone, and my app was installed and the activity launched in a few seconds.  This was much faster than the emulator.

Update: More RAM is good.
Rather than just buying a new computer, I realized that I could add 1 GB of memory to my computer, a HP DV2000 laptop.  This would give double my memory from 1 to 2 GB of RAM. For about 20 dollars, I bought and easily installed the memory.  I haven't done any rigorous testing, but the additional RAM has definitely helped development, as testing with Eclipse and an emulator is not that laggy.

No comments:

Post a Comment