List of IDEs for Android App Development, Which is Best for You?

Eclipse Alternatives for Android Application Development

An Integrated Development Environment (IDE) is an all-in-one solution that allows an application (app) developer (a.k.a. programmer) to perform the software development cycle repeatedly and quickly. That cycle is to design, write (or code), compile, test, debug and package the app software. For Android app development Google currently supports two IDEs (but read on for a list of alternative IDEs and languages):

  1. Android Developer Tools (ADT) – http://developer.android.com/sdk/index.html
  2. Android Studio – http://developer.android.com/sdk/installing/studio.html (in beta)

Both of these IDEs require the use of the Java computer language to write Apps. The first option uses the well established Eclipse IDE. The second option is based upon the IntelliJ IDE.

The Google IDEs and the Java language are not the only options for Android App development. Some developers might not need the power of Java or just don’t get on with C style languages. Some developers would like a single code base to support other platforms: Apple (iOS), Windows, Blackberry and the Web (HTML5). This is known as cross-platform development. Well there are plenty of alternatives to Google’s tools, see the following table for a list of Android app development IDE and computer language alternatives. Code can be written in different languages, like BASIC, HTML5 or Lua. Many of the alternatives are free to use, some open source, some restricted versions of paid for products. A few may not have a free version. Some will require the Android Software Development Kit (SDK) that comes with the Google tools to be installed. It is possible to install several IDEs onto the same computer to try them out.

List of Alternative Android App Development IDEs

Name Language C-P URL
AIDE (Android IDE) HTML5/C/C++ Yes http://www.android-ide.com/
Application Craft HTML5 Yes http://www.applicationcraft.com/
Basic4Android BASIC No http://www.basic4ppc.com/
Cordova HTML5 Yes https://cordova.apache.org/
Corona Lua Yes http://coronalabs.com/
Intel XDK HTML5 Yes https://software.intel.com/en-us/html5/tools
IntelliJIDEA Java No https://www.jetbrains.com/idea/features/android.html
Kivy Python Yes http://kivy.org/#home
MIT App Inventor Blocks Yes http://appinventor.mit.edu/explore/
Monkey X BASIC Yes http://www.monkeycoder.co.nz/
MonoGame C# Yes http://www.monogame.net/
MoSync HTML5/C/C++ Yes http://www.mosync.com/
NS BASIC BASIC Yes https://www.nsbasic.com/
PhoneGap HTML5 Yes http://phonegap.com/
RAD Studio XE Object Pascal, C++ Yes http://www.embarcadero.com/
RFO Basic BASIC No http://laughton.com/basic/
RhoMobile Suite Ruby Yes http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Software+and+Applications/RhoMobile+Suite
Telerik HTML5 Yes http://www.telerik.com/platform#overview
Titanium JavaScript Yes http://www.appcelerator.com/titanium/titanium-sdk/
Xamarin C# Yes http://xamarin.com/

Table Notes:

  1. C-P, Cross-Platform, if No only Android supported, if Yes supports App production for other platforms (you will need to check if your required platform is supported).
  2. Language, HTML5 also includes the related technologies of Cascading Style Sheets (CSS) and JavaScript.
  3. AIDE and RFO Basic allows code to be developed on the go on Android devices. The code can be packaged into full blown Apps.

Support for Android Programming

This above list of free and commercial IDEs for Android shows that other languages can be considered when wanting to develop apps. Some of these Android options provide cross platform development from the same app source code. (For some IDEs the Android SDK will need to be installed.) Purchased commercial Android development packages will come with varying degrees of support from the company and the user base. Open source and free packages will be supported by the user and development community, and sometimes paid for support is available. Forums are a useful source of answers for Android development issues.

Microsoft are developing Cordova support for Visual Studio, see Microsoft’s Multi-Device Hybrid Apps web page.

Android NDK

Google provides for free the Native Development Kit (NDK) that allows programming in C or C++, see the Android NDK page for more information. Use the NDK to optimise time critical portions of an App. Google does not recommend it for general App development.

Setting Up Google’s Android IDEs

If you need help installing Eclipse or Android Studio see our articles. For a quick Eclipse set up see:

For Android Studio set up see:

For a step-by-step set up of Eclipse see:

Please let us know of any other Android development options you come across. It would be interesting to hear of any App successes from using any of the above packages, drop us a line at dan@tekeye.biz.

ADT Android Bundle to Quickly Setup Android Development

Start Writing Google Apps on Windows

If you want to write Android Applications (Apps) you need the right software. Google provides free access to this software for Windows, Apple Mac and Linux PCs. An App is a computer program and like all programs it needs designing, writing, compiling, testing and debugging. This is all done in an Integrated Development Environment (IDE). There are many IDEs from which to choose. This article deals with the IDE provided by Google in the ADT Bundle for Windows. So read on for tips and information on installing and running the ADT Android bundle.

Use the ADT Android Bundle For Android Apps

Apps are written in computer language. Google’s preferred language for Android is the widely used Java. A popular IDE for writing Java programs is called Eclipse, from the Eclipse Foundation. The Eclipse IDE can be installed on to most PCs, including Windows PCs. For Android App development the Eclipse IDE requires the Android Software Development Kit (SDK) and the Android Development Tools (ADT), both from Google. All of these (Eclipse, SDK and ADT) are available in a large zip file from the Android Developers web site, the ADT Bundle for Windows.

Alternative Android App Development Environments

The ADT Android bundle is not the only option from Google. Instead of using the large zip file, install Eclipse, the Android SDK and ADT in separate steps. Good for those who need more control over the installation. (See our article Setup Android Development on Windows.)

A new option from Google is the Android Studio. Studio is currently under development so is only available under a beta release and thus subject to change. Studio does not use the Eclipse IDE, it uses the IntelliJ IDEA environment thus giving you a choice of editors. To set up Android Studio see our article Android Studio Install for Windows Based PCs.

Apps can be programmed in computer languages other than Java, using IDEs from companies other than Google. See the last section of this article for alternatives to using Java.

Install Java JDK

Java is Google’s preferred language for App development. As such the Java runtime and development kit needs installing before the ADT Android bundle. Go to the Java download page at http://www.oracle.com/technetwork/java/javase/downloads/index.html.

The Java Download Button

Select the Java download button and follow the instructions. Accept the license agreement and select the correct Windows installation EXE for your PC. (If unsure whether you are running 32-bit or 64-bit Windows use the System option in Control Panel. Under Basic Information the System type tells you if it is a 32-bit or 64-bit Operating System.) Run the Java installer to set up Java on your PC. See our article Installing Java on Windows (32-Bit or 64 Bit) if you need more help.

Download ADT Android Bundle

The Android SDK download page is at http://developer.android.com/sdk/index.html. Click on the Download the SDK ADT Bundle for Windows button. Accept the Terms and Conditions displayed by clicking the check box. Choose either 32-bit or 64-bit to match your Windows installation.

Another Download the SDK ADT Bundle for Windows button is enabled. Click the button to save the adt-bundle-windows-x86-YYYYMMDD.zip (32-bit) or adt-bundle-windows-x86_64-YYYYMMDD.zip (64-bit) file to your PC. Where YYYYMMDD is the release date for the package. E.g. adt-bundle-windows-x86-20130717.zip is the 32-bit ADT Android bundle released on July 17th 2013.

Extract Zip File Contents to Install Eclipse IDE and Android SDK and Tools

All the contents in the zip download need to be extracted. This can be done with Windows Explorer, however, on Windows XP you may get errors copying the files using Explorer. If so use an archive tool, such as 7Zip, to extract all the ADT Android bundle files.

The Android Developers website recommends extracting to a “Development” directory under your normal home location. However, that means a lot of program files are stored with your normal work. Some Android developers extract to C:\Program Files (this is a protected directory and you made be asked for permission to copy here), other developers install to a directory on the root of C: or other hard drive, such as C:\Android or C:\Development. Since the zip file contains a root directory named after itself simply copy that directory to a hard drive root. For example the contents of adt-bundle-windows-x86-20130717.zip can be extracted to C:\adt-bundle-windows-x86-20130717.

Add a Shortcut to Eclipse to the Desktop

Eclipse ShortcutTo access the App development environment quickly add a shortcut to your PC desktop. Using Windows Explorer open the eclipse directory in the extracted contents. Bring up the context menu (usually right-click) on the eclipse.exe program and select Create shortcut. Drag and drop (move) the new shortcut onto the desktop.

Run It!

The ADT Android Bundle is now installed. Run the eclipse.exe program (you can use the shortcut if you created one). First time in you will be asked to contribute usage statistics to Google. Select Yes or No and press the Finish button.

Create an Android Virtual Device (AVD) using the AVD Manager. An AVD allows testing of Apps without the need to use a physical device. Use the toolbar icon or select Android Virtual Device Manager from the Window menu. See our article Set Up an Android Virtual Device for App Testing for further information.

To test on a physical Android device install the manufacturers driver. With the driver installed use a USB cable to connect the device to your PC. You will need to enable USB debugging in the device settings.

Test your ADT Android Bundle installation by creating a simple App. See our article Your First Android Hello World Java Program. If you installed the ADT bundle to a drive other than C: you may get issues trying to run an App on an AVD. See our article Windows Symbolic Links for Android Installations on the D: Drive for a solution.

ADT Android Bundle Install Summary

Here is a summary of installing the ADT Bundle for Windows:

  • Download and install the Java JDK.
  • Download the ADT Bundle for Windows zip file.
  • Extract the contents to your PC.
  • Run it! (eclipse.exe).

Other Android App Development Options

If you struggle developing in Java, with the Google recommended IDEs for App development, there are other options. See our post Android Development Options, Tools and IDEs. It lists alternative development packages and languages.

A Swipe View Android Example for Screen Paging

Simple Flip View Tutorial Using ViewPager for the Android Screen Swipe Effect

This introductory tutorial shows how to code a simple page swiping App with the ViewPager class. It is the basis for more complex view flipping examples, such as an image swiping gallery (to replace the Android Gallery widget that was deprecated in API 16). The ViewPager controls the swiping (flicking the screen left and right) between multiple screens or pages of data. The ViewPager is fed with the multiple screens by a PageAdapter (or the sub-classes FragmentPageAdapter and FragmentStatePagerAdapter).

ViewPager in Action

The implementation of the PageAdapter will create (and destroy) the pages to be shown in the ViewPager. It will load the pages with the data (such as text or images) that must be displayed on the individual pages. This tutorial’s PageAdapter allows swiping through a series of strings (text). Once this example is complete it is easily extended. The follow on tutorial turns this example into a swiping image gallery with each image showing a caption. The following steps are performed to complete the screen swiping demo:

  • Start a new Android App in Eclipse.
  • Add the ViewPager widget to the Apps screen.
  • Define the data (text) to be displayed on each swiped page.
  • Define the layout for the swiped pages.
  • Implement PageAdapter which will create each page and load it with data.
  • Test the App.

Start a New Android App

This tutorial assumes that you are using Eclipse to try out this example code. Start by generating a new App in Eclipse, we called it Swipe Demo. (If you are new to Android programming see the articles Set Up Windows for Android Development and Your First Android Hello World Java Program.) You can of course add the page swiping effect to an existing App.

Adding the ViewPager Widget to the App’s Layout

The ViewPager is part of the Support Library, which is added by default to a new App created with a recent version of the Android API (the Support Library used to be known as the compatibility package). The ViewPager is referenced using it’s package name of android.support.v4.view.ViewPager. Open the default activity layout (or open the layout you are using) and add the ViewPager using the XML editing window, give it the id of viewPager. The ViewPager sits under the TextView (if using the layout created by the default Blank Activity after creating a new Android Application Project).

The TextView is also centered and the text changed from Hello world! to Please Swipe. It is made larger by assigning ?android:attr/textAppearanceMedium to the textAppearance attribute.

Defining the Data to Show on Each ViewPager Page

In this example some text is shown on each swiped page. Here the strings are stored in an array. The array could be defined in code but here they are in a resource file. Open the strings.xml file and add a string array. We are using the code names for Android version releases, all named after desserts: Continue reading

Pop-up Window in Android

How to Display A Smaller Window on Top of an Activity

The Activity screen is not the only way to interact with the user of an App. A brief message or dialog can be displayed in appropriate circumstances to ask a specific question or get specific input. Android has build in support for such small focused interactions that require immediate attention.

  • The Toast class – to display brief informational only message.
  • The Dialog class, managed by a DialogFragment – to support a flexible input that can display information and can ask for inputs or choices. There are several built in sub-classes including:
    • AlertDialog – supports buttons (from zero to three), list selections, check boxes and radio buttons.
    • ProgressDialog – supports a progress bar or wheel and supports buttons because it extends AlertDialog.
    • DatePickerDialog – supports selecting a date.
    • TimePickerDialog  – supports a time selection.
  • The PopupWindow class – allows a View to float on top of an existing activity. Suitable for custom informational messages.

These classes build their user interfaces through class methods with support from custom layouts when required. This article looks at using the PopupWindow class. What is the PopupWindow? The Android developer documention has the following class overview:

“A popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity.”

It can be used to display extra information without needing to code another Activity. An example would be to show results at the end of a game (or end of a level), which we will be doing in the following tutorial. The steps for this example code are:

  1. Create a new project.
  2. Design the pop-up window.
  3. Add the code to load and populate the pop-up window.
  4. Call the code.

Open a Project to Add the Pop-Up Window

In this tutorial we are assuming that you have a working project in Eclipse to use as a base, either open an existing project or create a new one (if you need help see Your First Android Hello World Java Program).

Design the Layout for the Pop-Up

For this example we are going to have a pop-up to display a game’s result as gold, silver and bronze medal positions. The pop-up will have a graphic (ImageView) for each of the medals, a TextView for the winner’s name and one for the score. The images for the medals came from Open Clip Art Library user momoko. They have been resized for an Android project and you can download medals_png.zip ready for importing into a project.

Gold Medallion Silver MedallionBronze Medallion Continue reading

Why Your TextView or Button Text Is Not Updating

Understand Why Changing View Text Does Not Work or is Delayed

When changing the text for a TextView using the setText method new Android developers sometimes fail to understand why it does not appear to work. The text not updating also applies to other Views as well, such as the EditView and Button, why this happens is explained. This article is also useful in helping to understand why the User Interface (UI) in your Android App might not be as responsive as expected. The underlying problem is the same. So if you are trying to find out why your setText() on EditText, TextView, Button, etc. is not working as intended, or you UI is sluggish read on, it includes a work around to help you out.

Not All Android Code Executes Immediately

When changing the TextView text this code is second nature to all Android developers:

For those new to programming the above is equivalent to these two lines but saves having to declare the TextView object:

When setText(“New Text”) is run the text is not updated immediately. Android is an event based system. Something happens on the device (the screen is touched, a key is pressed, a call comes in, etc.) and Android raises an event. An App is notified of an event and when one occurs that it needs to respond to it does so, often running the code that you have written. Your App runs its code in a loop under the control of the Android Operating Systems (OS). This code loop is referred to as the App’s thread of execution. There is only one thread and it is responsible for both running the App code and updating the display. The setText call posts a message to update the display, so the update does not happen immediately. Once remaining App code has run the UI messages are processed, then the text changes. A running App’s execution thread can be viewed as shown in this simplified diagram. Continue reading

Running an Android SDK Sample App

How to Load and Run a Sample Program from the Android SDK

The Android Robot LogoThe Android Software Development Kit (SDK) gets updated with new version platforms for each new release of the Operating System (OS). Each version platform can be loaded onto your development machine with SDK Manager.exe. There are available sample Applications (Apps) to showcase Android features and provide example code that allows developers to see how to use the Android Application Programming Interface (API).

Getting Hold of the Android Samples

Each SDK platform version provides Android sample source code project, however, they must be selected for installation on your development machine using the SDK Manager program. Run SDK Manager and wait for it to finish doing it’s checks. Expand the required Android Version folder to see and select the Samples for SDK option.

Exmaple Apps can be Loaded with the SDK Manager

Once the samples have been installed they will be found in the android-sdk/samples folder in the Android SDK’s install directory. (On Windows this may be under the Local Settings/Application Data folder, e.g. C:\Documents and Settings\John Doe\Local Settings\Application Data\Android, or wherever you chose to install it.) There will be a folder for each Android API version for which you chose to install the samples, called android-x where x is the API version.

Android SDK Samples

See our article Use Android SDK Samples for Guidance to see a list, and brief description, of the example Apps supplied with the various Android versions. Continue reading

Putting a Web Search Button in Your App

Tutorial on Adding a Simple Internet Search Button to an Activity

This article assumes that your computer is configured for developing Apps using the Eclipse Integrated Development Environment (IDE) (see Set Up Windows for Android Development if not), and that you can create and run a simple App (see Your First Android Java Program if in doubt). The tutorial covers adding a simple Internet search to an App. If functionality is required to search for items within your App (such as the database) see the Android Developers Guide Search page.

Start by creating a new Android Project in Eclipse using the File menu, select New then Android Project. Fill in the Project Name, here Web Search is used. Click Next and select the build target from the installed APIs, e.g. Android 1.5, any of the installed APIs will work and it can be changed later if required. Click Next and enter the Package Name in the required format, e.g. biz.tekeye.websearch, leave Create Activity checked with the default Activity name, click Finish.

The User Interface (UI).

Android Xtra High Density Magnifying Glass IconTo implement the web search a EditText will be used for the search term and an ImageButton with a magnifying glass icon is used to start the search. The magnifying glass image is by Open Clip Art Library user warszawianka (OpenClipArt.org is a good source of free clip art images). See the image’s web page and use the PNG button with a value to generate the image at your required size (see the article Free Android Icons Using OpenClipArt.org and Paint.NET for more detail on converting a Open Clip Art Library image to PNG format). The image is placed into the res\drawable folder in the project. You can of course use you own image for the button or use a text Button. The magnifying glass icon is available from the Android Graphic Resources page, use the Zip file and the icons can be imported into the project using the File menu Import option (see Move Android Code Between PCs Running Eclipse for details on importing from zip files). The magnifying glass icon is called magglass.png in the Zip file. Continue reading

SDK Manager not Working in Windows

A change in the Android Software Development Kit (SDK) Tools that took place between release 16 and release 17 means that on some Windows configurations the Android SDK Manager (SDK Manager.exe) does not run outside of Eclipse, that issue is discussed in this article. Occasionally the SDK Manager does not work for other reasons, in which case one possible solution is to manually update the SDK tools as discussed at the end of the article Keeping the Android SDK Updated. However, if SDK Manager (and other Android utilities) worked prior to release 17 of the SDK tools then read on. The article also discusses why recent Android SDKs fail to install on a Windows 64-bit system. Continue reading

About Box for an Android App

How to Build a Reusable About Dialog for Your Android Apps

The venerable About Box, whatever the Operating System, whatever the program the chances are it has an About option. There is a Wikipedia entry for it, http://en.wikipedia.org/wiki/About_box, and it is useful for support:

Hello, there is a problem with my application?

Hi, can you press About and tell me the version number?

Since it is likely to be required again and again it is worth having a ready made About Box class that can be easily added to any new App that is developed. As a minimum the About should display a dialog with a title, e.g. About My App, the Version Name from the manifest, some descriptive text (loaded from a string resource) and an OK button. This tutorial presents the code for an About Box class that can be dropped straight into any App.

The Version Name can be read from the PackageInfo class. (PackageInfo is obtained from PackageManager which itself is available from the App’s Context). Here is a method to read an App’s Version Name string.

[code lang=”Java”]static String VersionName(Context context) {
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(),0).versionName;
} catch (NameNotFoundException e) {
return "Unknown";
}
}[/code]

Continue reading

Saving an Activity’s State when it’s Interrupted

Android developers soon become aware of the precarious existence of the Activities they code, with the Android operating system pausing, stopping or killing Activities as it sees fit (see the Android Lifecycle on the Android developer site and the article Testing Android’s Activity Lifecycle). Despite this users expect Applications to be robust, when the user returns to a screen, e.g. after taking a call, the screen is expected to be the same as when it was last seen, that includes any values entered into any fields.

The term state is used to describe what data an application has at a moment in time, what it is displaying and the work it is performing. For example a quiz App would know which questions have been asked, how many answers were correct or incorrect and which question was comming next. If a user running the App went and checked their email, on return to the quiz it would not be expected to have restarted. For the quiz to pick up where it left off the internal state of the quiz is preserved. Android has built in support for saving and restoring state, by overriding a couple of functions an Activity’s state can be preserved. Let us look at a simple App and its internal state. Try the following test with a single EditText in an Activity. Continue reading