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)

There has been an explosion of mobile applications in recent times, coinciding with the expansion and app developers in the digital marketplace. As a result, companies of all sizes, in all industries and in every country have begun to appreciate how mobile applications can increase engagement with their customers. These efforts allow them to market their products in a way which relates to the modern consumer

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

Android Developers on Google+

This morning Google announced a brand new Google+ page for Android Developers. The goal is to create “a place for Android developers everywhere to meet, share, and connect with the people behind the Android developer experience”. The Android Developer Relations team will be hosting Google+ Hangouts from this page, and even calling in some external developers … Read more

New Forum for Android Developers

Roman Forum Today I’d like to announce a bit of a new direction for this website. I’ve just launched an official forum, associated with the blog. It’s available at http://www.makingmoneywithandroid.com/forum/.

There’s a couple of reasons why I decided to launch this forum. I’ve been getting a lot of email queries lately, which would probably be of general interest to many blog readers. Questions about how I developed an app, or details about the monthly income reports, as well as more general Android queries. Rather than communicating with people individually over email, it would make a lot more sense to post these questions publicly so everyone can benefit from them.

But also also I’d like to give others an opportunity to contribute their knowledge & experience in a public setting. Not everyone has their own blog, and even if they do, it might not have a large readership yet. My hope with this forum is to provide a place where Android developers can share experiences & code, with a focus on marketing and making a profit from their apps.If you are a developer or business manager of your software business contact Future sharks for directions.

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

Live Wallpapers, and PreferenceActivity bugs

Android Live WallpaperI’ve been working on a new app lately – a CPU monitor live wallpaper for Android. There are some great tutorials & sample code out there if you’re looking at starting with live wallpapers. I recommend the Androgames tutorial, as well as the official Android documentation, and CubeLiveWallpaper sample application. Both tutorials take a slightly different approach, so make sure you understand the concepts (especially threading) thoroughly before writing your own wallpaper. I started off using the Androgames model, but then ended up completely rewriting the code to optimize battery use. The end result is much more like the CubeLiveWallpaper example.

While coding the settings screen for this app, I ran across two pretty major bugs in the current Android SDK. It seems the implementation of PreferenceActivity is quite broken, and has been for several versions of the SDK. In particular, ListPreference and CheckBoxPreference each have outstanding bugs which nearly every developer will encounter when trying to use these classes.

Read more

How to add the Google Plus One (+1) Button to WordPress

Google Plus One ButtonGoogle has just announced the availability of the Plus One (+1) button for webmasters. Google +1 is similar to Facebook’s “Like” button. Clicking “+1” on a webpage will share the page publicly with your friends. But where can your friends see this? Unlike Facbook, Google doesn’t have a homepage where you can see all your friends’ activity. Instead, your +1’s will be shown to your friends – in the actual Google Search results. If you click +1 on a news article about Android, the next time your friend searches for “Android” there’s a good chance they’ll see this article, with a little icon beside it indicating you recommend the link.

Obviously, Google +1 is a powerful tool for website owners. By placing a simple button on your website where visitors will click, you can directly influence your search ranking! But how can you add the +1 button to WordPress? There are no plugins or widgets for +1 yet. Instead, I’ll show you how to add the Google +1 button directly to your WordPress site.

Read more

AdMob Code Update Available

AdMob LogoAdMob recently released an update to the Android and iPhone SDK. Many developers have noticed a message on their “Sites & Apps” report indicating there is a “code update available“. However, AdMob don’t seem to have released a changelog or any release notes indicating what has actually changed in this latest version (v 4.1.0). So what’s the deal – should you upgrade?

Read more

How to add an EULA to your Android App

End User License Agreement dialog for an Android AppMany apps available on the Android Market include an End User License Agreement, or EULA. This is a simple dialog that appears when you first launch the app, and presents a licence agreement governing your use of the app. Most often, this dialog explains what information the app will collect from your phone, and how that information may be used by the developer.

Some third-party libraries such as Google Analytics require you to disclose your data collection policy to users. The most common way to do this is to present an EULA dialog when the app is first launched. So how do you make an EULA dialog? Here are a couple of tutorials to help you add a license agreement to your Android app.

Read more