Wednesday, December 10, 2014

Wednesday, December 10th, 2014

I have not worked on college applications since Monday, unless going through promotional emails and mail brochures from colleges counts as working on or updating my college list.
As for my thesis work, I managed to iron all of the errors out of/fix the compatibility of the book's sample code yesterday. When I tried to build the app, I discovered that I would have to sign the app using a certificate file called a keystore before I was able to build it and push it to my phone over USB. I learned that Android applications can be signed in one of two modes - debug mode and release mode. Debug mode signatures use only a single private key that the developer holds for verification of the app's source. In other words, it's a symmetric-key encryption where there is only one key, and that key is just a password the developer sets. Signing apps in release mode is far more complicated. As I understand it, the Google Play Store makes a public key available to normal users and installers of the app, and the developer creates a set of private keys that are stored in a keystore file. Every time the developer releases a new version of the app, he makes a new set of private keys. When a user installs the app for the first time or updates to a newer version, the installer program checks the public key provided by the Google Play Store against the private keys in the keystore file in the app being installed to see if they match. If they do, then the app is installed as normal. If they don't, the installer flags the app as incorrectly signed, and doesn't install it.
This morning, after some messing around with my compiler and a few internet searches, I figured out that the password used by default for the debug keystore file included with the compiler was just "android". Once I put in that password, the compiler was able to sign my app without any errors. It then saved a .apk ("Android PacKage") file to my desktop. I connected my phone to my computer with a USB cable, opened my command line tools, and pushed the package to my phone. I was relieved to see that it both installed and ran without any hitches, despite the enormous gap in software versions. So that was it! Now that I know how to build and test Android apps, I can start learning how to make apps that actually do things.

P.S. - Even though (I think) I know how to get the source code examples for this one to work, I would like to be able to not worry about compatibility or outdatedness at all, so I will likely be ordering a current edition of this or another book over the holidays regardless.

Monday, December 8th, 2014

In the wake of submitting my first college application and several other events, I have decided to rethink what I want from my college experience. I plan to build a new college list based on my decisions. In the meantime, though, I have started a bunch of Common Applications. I need to work on them.
In other news, thesis-related news, I have retrieved and resumed reading an old book that I purchased about a year ago on developing for Android. When I say old, though, I mean ancient - the book teaches developing apps for Android version 1.1. To put that in perspective, Google released Android version 5.0 (the cutting-edge version my phone runs) in early November of this year. This would normally be okay because it still teaches me the basic concepts of Android development if not its current features, style, or sophistication. However, a crucial element to understanding what's said in the book is having the source code provided on the publisher's website with which to work and experiment alongside the text. The source code is fortunately still available, but it is taking me hours to sort out the errors caused by its lack of compatibility with the Android development tools that I am using (which are, ironically, the ones that the book recommends - the book is just old enough that even they won't work). On top of that, I'm worried that Andoid 1.x apps won't even run on my phone. Oh, well. I guess I will just have sort it out. I have to fix the example source code before I can even build the example app, much less install it on my phone. But enough railing on the age of the book and my difficulties starting with it. Quite frankly, I'm relieved - no, thrilled - to be back to work again after such a long stretch of doing little more than fretting about and procrastinating against it.