New Android SDK Tools and ADT Revision 17

Android with Screwdriver and Spanner InlaidThe Android Developers blog just announced an update for the Android SDK Tools and ADB. This new release, version 17, brings many improvements to the build process. Here are some of my favourite new features:

  • Added check for Android API calls that require a version of Android higher than the minimum supported version. This will save you from having to test your app on Android 1.6 for example, only to have it fail due to an API call that was introduced in Android 2.1
  • Added a feature that allows you to run some code only in debug mode. Builds now generate a class called BuildConfig containing a DEBUG constant that is automatically set according to your build type. You can check the (BuildConfig.DEBUG) constant in your code to run debug-only functions such as outputting debug logs.
  • Added feature to automatically setup JAR dependencies. Any .jar files in the /libs folder are added to the build configuration (similar to how the Ant build system works). Also, .jar files needed by library projects are also automatically added to projects that depend on those library projects.
  • Updated the resource chooser to show the resolved value for resources. For example, when selecting @string/hello the chooser displays a resolved value such as “Hello World”). The resource chooser also now allows you to edit the chosen value directly.

There are plenty more changes to be found in the SDK Release Notes and ADT Release Notes. The Android Emulator can now run x86 system images at native speed, thanks to contributions from Intel. Lint has also received a major upgrade, with 40 new rules checking for performance and code issues.

Read more…

AIDE – Develop Android Apps on Android

Android Java IDE (mobile Eclipse)

During the past month or so, I’ve been testing a number of different apps on my Asus Transformer Prime tablet. The landscape form factor, coupled with a built-in keyboard make the Transformer a very different beast to most other Android devices.

While I’ve found the device great for gaming, basic productivity and email applications, I still needed my desktop for one important task – developing Android apps. Eclipse doesn’t run on Android, and for a long time there was no suitable Java IDE which could compile Android apps natively on the ARM architecture.

Along comes AIDE.

Read more…

Google Play – The New Android Market

Google Play - Android MarketToday Google announced (in several places) that the Android Market is being rebranded “Google Play

The new marketplace (sorry, “play store”) includes content from four main areas – Movies, Music, Apps & Games, and Books. Of course, not all of these are available outside of the US yet, so folks in Australia will only get access to Apps & Games and Books for now.

Read more…

Over 700,000 Android Devices Activated Per Day

Chart of Android Activations by David Webb

Andy Rubin just posted the latest Android goodness on Google+. Apparently there are now over 700,000 Android devices activated per day around the world. And that’s not counting upgrades.

The full message, posted in two parts on Andy’s Google+ profile:

There are now over 700,000 Android devices activated every day

…and for those wondering, we count each device only once (ie, we don’t count re-sold devices), and “activations” means you go into a store, buy a device, put it on the network by subscribing to a wireless service.

Read more…

Galaxy Nexus & Android 4.0

Google Android 4.0 LogoI watched the live Google/Samsung announcement of the Galaxy Nexus yesterday. The event was held in Hong Kong, and streamed live to the Android Developers YouTube channel. I wasn’t completely blown away by the hardware – seems pretty run-of-the-mill after being spoiled with the Galaxy S II. But I was impressed to see how much thought Google has put into the user experience for Android 4.0 (“Ice Cream Sandwich”).

I get the impression that this time, Google’s focused on the little things. Like zero shutter lag for the camera, rather than the megapixel count. Or streamlining the voice-to-text capabilities, as well as copy & paste. These “little things” are really the things that matter for consumers. Apple’s known this for a long time, and one of the selling points for Apple’s phones is the great user experience (even if the flexibility isn’t there). I think Google’s trying to take a leaf from Apple’s book here, and start building an engaging, “love-able” (their words, not mine!) user interface. An admirable goal, and from what I’ve seen, they have taken big steps in this direction with the latest version of Android.

But that’s the consumer side of things. For developers, Android 4.0 introduces a number of new concepts, including:

  • Unified UI toolkit – “A single set of UI components, styles, and capabilities for phones, tablets, and other devices”. So Android 4.0 has finally pulled together the Gingerbread & Honeycomb releases.
  • Rich communication and sharing – A bunch of new APIs, most significantly Android Beam, which enables NFC-based instant sharing between smartphones.
  • New lock screen – Not sure how much opportunity there is for developers to plug in here, but Google has introduced a new set of instant actions which can be accessed directly from the lock screen (camera & music controls).

    Read more…

Intent.ACTION_SEND Crashes Facebook App

I came across a rather obscure bug today, while trying to submit my app Tap That! Number to the Amazon Appstore. I received a rejection notice detailing several problems with my app, including this strange one:

Application’s “Feedback” functionality “Facebook” option is not working.

At first I had no idea what this meant. My app never mentions Facebook at all. The only “Feedback” option I have is a menu item designed to send an email to the developer.

After digging around a bit, I found that the code I was using to launch an email intent was also recognising Facebook and presenting it in the list of available apps. Here’s the code I was using:

Read more…

How to make $250 a day (and get banned from the Android Market)

Logo for the Google+ Invites App

A few weeks ago I did something which, in retrospect, was probably rather stupid. But it was surprisingly successful while it lasted. As I wrote earlier, I’ve been using Google+ since the day after it was launched. I myself received an invite from a stranger who was offering invites publicly. For this reason, I’ve been keen to share invites with anyone else who’s looking for one. I put up a post on this blog offering free invites, and got a huge response from the Android community. In fact, there were so many responses that it overwhelmed my email after a few days. There’s no way I could have kept up with the demand.

Rather than stop accepting requests altogether, I wanted to make it easier to handle the load. (NB: At this stage there was no limit to the number of Google+ invites you could send.) My first thought, trying to work out a faster way to do things, was “hey, is there an Android app for this?” A quick search turned up a negative. No Android apps offering Google+ invites. So, why not make one? It seemed a pretty good idea, so I spent that afternoon writing a simple app that accepted an email address, and a description of the request. The data was sent to a PHP script on my server, so I could go through and invite the email addresses stored in a database.

Actually, it’s not that simple to write an Android app that POSTs data asynchronously to a server, checks the response, and handles errors gracefully. I re-used some classes from another unreleased project, but it was still a bigger job than I expected. But the actual coding is an issue for another day. The most interesting part came when I released the app on the Android Market.

Read more…

Android Income Report #3

ChartHere’s an interesting stat for you – this month, I made more money writing about Android than I did from Android apps themselves! How does that work? Well, this blog has seen a pretty steady increase in traffic since I wrote the first article at the beginning of April. A couple of weeks ago, that same article made it to the front page of Hacker News, which was a catalyst for this website – over 20,000 new visitors in one day. Thanks in part to the dramatic increase in traffic, my Google AdSense earnings were high enough this month to justify including them in this report. In fact, they exceeded my AdMob earnings by a significant margin.

Also, you’ll probably notice I’m no longer using the title “xx month on the Android Market”. That’s simply because from now on, I’ll be expanding beyond Google’s distribution channel, and trying out alternative app stores such as Amazon, GetJar and SlideME. The Android Market is still my first and primary focus though.

Read more…

CPU Usage Live Wallpaper – Launch Discount

Android Live Wallpaper
CPU Usage Live Wallpaper PRO (with gradient enabled)

My new app CPU Usage Live Wallpaper is now live on the Android Market. For the first few days I’m offering the PRO version for a special price of US$0.99 (or the equivalent in your currency). If you’d like try before you buy, check out the free version. It does the same job, but gradients & extra configuration options are disabled.

This simple wallpaper shows the current CPU usage on your phone, visualized by color. Light green indicates low CPU usage (about 0-20%), orange is medium usage, all the way to red which shows high CPU usage. There are more than just three colors though – this wallpaper cycles smoothly through the spectrum from green to red.

Read more…