Wednesday, March 11, 2015

Hurdles in android development

I have recently started trying to create an android app. Belonging to the command-line world of C/C++-gcc-make-linux this entire IDE-based development system is a big puzzle to me. I am not averse to IDE's. I wrote some of my first programs in Visual C++ 6 which was a terrific IDE. But somehow I could never get the hang of Eclipse, and could never appreciate why people used it when it took so much time to start up (VS was fast).
Coming back to android, I have succeeded in building a bare bones app from the command-line, and using Google Play services in it. The problem is that most guides on the internet (including Google's) lean heavily on the Eclipse or Android Studio paths. I couldn't find much guidance for the problems I have faced so far, and they have taken me a long time to figure out.
For example, when I tried to integrate Google Play services (for using GPS location data in my app) everyone told me about copying the google_play-services_lib folder to the libs directory of my project, and also updating the file of my project. But no one told me about putting a build.xml file into the google_play-services_lib folder. I learnt it the hard way.
The latest problem I was facing is that I couldn't install apps onto my phone because adb was complaining about my device being unauthorised. I did run my app on the emulator -- but that is a very slow way and practically useless for testing anything apart from the UI. Today, I finally found the answer to my problem in this stackoverflow post. And my app now installs merrily on my phone.
My next target is adding unit testing to the app's code, and also improving the location-finding capability. Let's see how I progress.