So I finally got back into developing some Android code, I have some projects in mind but since I”m a lazy mofo I won’t talk about them until I feel like they’re turning out how I want. Typically when I start a new project I think of splitting the key functionality of the application into pieces then start doing some reading and googling to see how to do those pieces. Then it becomes a matter of taking those pieces and putting them together.
I did some reading on how to do multi-touch. Pinch to zoom, drag, that sort of thing. I downloaded the latest beta for JetBrain’s IntelliJ because I knew they had the Android framework included, and I had used their framework in an earlier version (8.x) and it worked fine with the emulator, albeit slow.
I found an interesting article online regarding how to do multi-touch and proceeded to copy/paste some of the code into my project. After getting everything built properly I proceeded to run my app. For some reason my app wasn’t showing up. I know the emulator is slow but damn.. I started looking through IntelliJ’s logs to see if I was missing something and the log says .. my app is running. WTF?! Well it turns out that I had my phone plugged in and the Android SDK connector (ADB) automatically uploaded my app to the phone. I turn the screen on and there it is. Funny that I totally forgot that the phone was plugged in and that I had USB debugging turned on by default. Even more exciting was that the process was instant, no more waiting 5 minutes for the emulator to start. Fantastic stuff.
I found this interesting post on another Android developer’s website (Steven Osborn):
Android 2.2 isUserAMonkey() check
Per the documentation: Returns “true” if the user interface is currently being messed with by a monkey.
There is another gem in the Log class, they’ve added a new log level ‘wtf‘ which in this case means “What a Terrible Failure”
Great stuff, pretty easy to tell the Google developers are geeks like myself, I love shit like that in source code, makes writing stuff a lot more fun.