Tag

google

Gradle: Google’s New Android Build System

By | Android, Mobile | No Comments

If you talk to a typical Android developer about their choice in build tools, chances are you’ll overwhelming hear Maven. But there’s a new kid on the block looking to change that. android_gradleAccording to RebelLab’s recent global survey of 2164 Java professionals, Gradle ranked as the highest technology that developers are most interested in learning with 58%. Let’s take a look at what Gradle can do.

Google introduced Gradle as an advanced build system to create custom build logic through plugins. Google selected Gradle as the foundation of the Android SDK build system because it provides flexibility and imparts a common standard for the build system. With a declarative Domain Specific Language (DSL), Gradle developers have access to a single, authoritative build bath that powers both Android IDE and builds from the command-line.

The main functions behind Gradle is to:

  • Make it easy to reuse code and resources
  • Enhance the ability to make several versions of an application
  • Improve configuration
  • Good IDE integration

Features and Benefits of Using Gradle

  • Integration with Android Studio: Android Studio is tightly integrated with the Gradle build system.
  • Simple, Declarative, Domain-specific Language: Gradleware and Google works together to make simple, declarative DSL for Android builds.
  • A Single Build System: Gradle is the authoritative build across the IDE and command-line.
  • Product Flavours, Build Variants and Build Type: Provides an easy way to create keystore and signing configuration across different build type.
  • Dependency Management: Gradle offers a flexible dependency management that can use the existing Maven repositories or reference local JARs.
  • Multi-Project Support: Supports mutile project from both IDE and command-line.
  • Binary Bundles for Libraries (.aar): Gradle supports the new .aar binary bundle format for library projects.
  • Full Incremental Builds: Incremental Builds means your waiting time for build process will be reduced.
  • A Focus on Testing: With Gradle you can run unit and integration tests without creating subprojects. Gradle supports several scenarios for integration testing on build servers.
  • Test Server API supported Hosted Testing: Integration with Jenkins-based build servers and services from AppThwackTestDroid, and Manymo means that your build can support complex, massively-parallel integration testing scenarios.

Incorporating Gradle in Android Studio

Make sure you download the Android Support Repository under Extras using the SDK Manage

Gradle 1

The gradle.build provides some instruction on what you have to do.

Gradle 2

Gradle 3

Despite Maven dominating among Android build tools, fast-growing Gradle appears to be gaining in popularity among Android developers. Have you had the chance to experiment with Gradle? What are your thoughts on Gradle gaining momentum on Maven? Comment below!

 

How to Develop Hello World Google Glass Android App 

By | Android, Mobile | No Comments

Google Glass is an augmented reality wearable computer with a head-mounted display (HMD) that is being developed by Google in the Project Glass. It’s looking to reinvent the mobile device scene by providing hands-free Internet/computer access for users on the go. Despite this technology remaining in it’s infancy stage, our early adopter Google Glass App Experts have begun experimenting with the Glass Development Kit (GDK) so we’re thrilled by the potential this game changer has to offer. Below are some simple guidelines to follow to develop your first Google Glass app to leverage this emerging technology and familiarise yourself with the coding.

Developing A Google Glass App

If  you’re comfortable with Android, here’s all you need to know to get started:

  • Get the Android 4.4.2 (API 19) SDK and Glass Development Kit Preview add-on from the Android SDK Manager.
  • On Glass, turn on USB debugging (Settings > Device Info > Turn on debug).
  • Import some GDK samples with the File > New Project > Android Sample Project menu.
  • When you’re ready to create a project for your own Glassware, use these settings:
    • Minimum and Target SDK Versions: 19 (There is only one Glass version, so minimum and target SDK are the same)
    • Compile with: Glass Development Kit Developer Preview
    • Theme: None (ADT and Android Studio usually assign a theme automatically, even if you specify no theme, so remove the Android:theme property from your manifest after creating a project)
  • Don’t know where to start? Read these pattern and developer guides for additional information and helpful process tips.

Developing Hello World Immersion for Google Glass

This section describes how to create a simple hello world application for Google Glass using the GDK. There are two options for how the Glassware should show up on the device: as a live card that is part of the timeline or as an immersion that is displayed outside of the context of the timeline. We are focusing on how to write an immersion.

You might be wondering what is an immersion ? An immersion is basically an Android activity. The name immersion implies that it is not part of the normal Glass timeline. Instead, it takes full control of the device – except for the back gesture (Swipe down). To go back to the timeline you need to leave the immersion.

Google Glass 1

Project Set Up:

Create a normal Android project with the following settings:

  • Set minSDKversion and targetSDKversion to 15 (Android 4.0.3)
  • Set compileSDKversion to “Google Inc.:Glass Development Kit Sneak Peek:15”
  • Do not assign a theme to your application or derive your own theme from Theme.DeviceDefault.

Creating the Immersion:

Let’s create a simple activity. The Card class helps us to create a layout that looks like a timeline card.

Google Glass 2

Launching the Glassware Voice Commands:

After creating the activity, we need a way to start our Glassware. A common way to launch Glassware is to use a voice trigger. Let’s add a simple voice trigger to start our hello world activity.

First we need to declare a string resource for our voice command.

Google Glass 3

The next step is to create an XML resource file for the voice trigger using the previously created string value.

Google Glass 4

Now we can add an intent filter for the VOICE_TRIGGER action to our activity. A meta-data tag links it to the XML file we wrote above.

Google Glass 5

The developer guide requires you to add an icon for the touch menu to the activity (white in color on transparent background, 50×50 pixels)

An App Experts tip: the Glass Asset Studio is a helpful tool to generate these icons.

Google Glass 6

The Final Glassware

Now we can start our Glassware by saying “ok glass show hello world”:

Google Glass 7

Another option to start our Glassware is to use the touch menu and scroll to the “show hello world” command:

Google Glass 8

That’s it, you’re all set! We hope this tutorial has helped Android enthusiasts in developing their first Google Glass App. We look forward to seeing this new wearable experience takeoff. Stay posted for additional blogs on how to build great Glassware.

Have you had the chance to experiment with Google Glass? What are some of the major challenges you’ve experienced? Feel free to give us a shout below!

KitKat 4.4: Android’s Sweet Treat

By | Android, Mobile | No Comments

As of 2014, Google’s Android operating system powers more than One Billion mobile devices. Since carriers were free to use Android to power SmartPhones and Tablets, it wasn’t long before they offered Android-powered phones to their mobile customers for free – with a two year service plan, of course.

While their wide array of mobile devices and their unique customization capabilities make Android appealing for many users and developers, it makes for a decidedly fragmented market.  Getting updates and patches delivered and applied has been frustrating for both users and developers alike.

Resolving problems with fragmentation and performance as well as difficulties with seemingly simple tasks like applying updates have annoyed users and frustrated our Android Mobile App Experts equally.

To overcome this, Google launched their new OS Android 4.4 KitKat last November to take over the mobile world with some practical updates.

android-kitkat

 

 

 

What’s New

This newly updated version doesn’t offer a huge list of jaw dropping changes in functionality like the release of Ice Cream Sandwich, but where it lacks in bells and whistles, it makes up by offering more versatility for more devices. That is, this new version will be compatible with all Android devices from high-end to low-end, as long as as they run on 512 MB of RAM. This is an important advancement because there were phones that do not allow to upgrade the latest version of Android, which gave users an inconsistent experience. This forced some devices to run on older versions of Android with new applications on the market. Now with KitKat, Google’s expanded the operating system to run on many more devices, helping to bridge the gap between low-end and high-end devices alike.

Google’s Goal

Google is moving towards standardization with one target in mind — get KitKat on all Android devices, similar to how Apple has made iOS mandatory for it’s users. The reasoning is simple: fragmentation has plagued them far too long, making the cheapest devices nearly impossible to get the latest functionality without paying a high premium. Cheaper devices often have a smaller amount of memory storage and RAM, which meant that users could only run an old version of Android. Meanwhile, the more powerful and more expensive phones have faster processors and more RAM, allowing the latest version of the Google operating system.

How They Did It

Google reduced the size of the operating system by 16 percent, allowing it to run on devices with just 512 MB ​​of RAM, which meant that more affordable mobile devices could run the latest OS, which is exactly what Google is looking for. Google now offers the possibility of manufacturers to market their devices with the latest version of Android’s KitKat. In layman’s terms, more affordable choices + the latest in upgrades = global market domination. Pretty sweet idea, don’t you agree?

What do you think of Android’s 4.4 KitKat? Give us a shout below!