Google I/O: Android Studio launched to build and test Android apps

This year’s I/O saw Google showcase a series of mobile-related initiatives focused on helping the Android community to grow and prosper.

As Android continues to dominate the smartphone market, expectations are high for new Android [url=http://gigaom.com/2013/05/15/google-io-statshot-900-million-android-devices-activated/]activations[/url] in 2013. Google are forecasting that in 2013, 900 million Android devices will be activated. The Google Play app now sees more than 2.5 billion installs every month with 48 billion apps downloaded since the launch of the Android Market in late 2008.

From a mobile development perspective, the most important announcement was Google’s Android Studio, a series of free tools to create, test and distribute Android apps for a variety of layouts and configurations.

The only prerequisite to use Android Studio is the ability to program in a modern object-oriented language such as Java, C#, C++, VB or anything close to Java at a reasonable level.

While Android Studio is a de facto IDE (Integrated Development Environment), it is currently only available as a Developer Preview and although it can be used there may be some bugs.

To use Android Studio the first thing to do is to install the latest [url=http://www.oracle.com/technetwork/java/javase/downloads/index.html]Java JDK[/url], [url=http://developer.android.com/sdk/installing/studio.html]download[/url] and install the package from the [url=http://developer.android.com/sdk/installing/studio.html]Android Studio page[/url] according to your OS.

[img]/files/androidstudiowelcome.gif[/img]

Once downloaded, simply click on Start Android Studio and select the New project option and enter a name for the application you want to develop. Follow the required steps and choose an icon for your app and an Activity related to the app then click the Finish button. Android Studio will start creating the application.

When the project has been created, it will be displayed in the Projects tab. Then you only need to concentrate on the files named MainActivity.java which determines the Activity’s behavior and Main_Activity.xml which determines the visual appearance of the app.

[img]/files/androidstudio1.png[/img]

If you double click on the MainActivity.java file you see the following Java code:

The onCreate function is called when your app is run. It creates the view and performs tasks associated with the Activity.

In Main_Activity.xml, using the tree-structure of Android Studio, you can give your app a design and a visual look which reflects the purpose of the App.

[img]/files/androidstudiofinal.gif[/img]

Once the App is ready, it’s time to test it and this is one of the most important features of Android Studio because it enables you to view how an app will work over different tablets, smartphones and devices. Simply go to Tools–>Android–>AVD Manager to begin testing different AVDs. Each AVD has a different set of characteristics corresponding to different devices.

Once the AVDs have been set up, simply select the device you want from the Android Virtual Devices tab and click Start to run the emulator and see how the application runs on the device(s) you’ve selected. When Android is ready, simply click the green triangle icon or the menu command Run to get an overview of the app which will appear in the emulator. You can modify and re-run the app without having to restart the AVD or any real hardware connected to the machine.

[img]/files/androidstudiolast.gif[/img]

From a developer’s point of view, Android Studio is a good start to dealing with fragmentation as it enables you to see how an Android application runs on different devices and screen sizes. This appears to a first step before Google integrates more services into Android Studio to make developing apps even easier.

(Screenshots courtesy of [url=http://karanbalkar.com]Karan Balkar[/url] & [url=http://www.i-programmer.info]iProgrammer[/url])

Leave a Reply

Exclusive tips, how-tos, news and comment

Receive monthly updates on the world of mobile dev.

Other Products

Market leading device intelligence for the web, app and MNO ecosystems
DeviceAtlas - Device Intelligence

Real-time identification of fraudulent and misrepresented traffic
DeviceAssure - Device Verification

A free tool for developers, designers and marketers to test website performance
mobiReady - Evaluate your websites’ mobile readiness

© 2024 DeviceAtlas Limited. All rights reserved.

This is a website of DeviceAtlas Limited, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland