All Posts By

The App Experts

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!

Android vs iPhone: Is marketing influencing mobile loyalty?

By | Android, iOS, Mobile | No Comments

Android or Apple? This debate is something that developers have been talking about for years and countless articles have argued the merits of one over the other. Our App Experts were discussing the two competitors recently, and an intriguing question came up to try and explain Apple’s success:  Can a good marketing strategy beat a cheaper product that’s similar in nature?

Apple completely changed the mobile world when they released the first iPhone. It was a remarkable moment. Blackberry was already in existence by that time, but Apple showed us that smartphones could be more than just a tool for work. They managed to expand from a phone previously used only for calling and texting to the preeminent key to unlocking the web on the go. Someone had to follow.

Android – The New Kids On The Block

When Android first appeared on the market, it was seen as a cheap alternative to having an iPhone. But Android grew in popularity thanks to having an open source policy which allowed developers to code freely. Today, Android captures the spirit of individuality and nonconformity. If you compare Apple’s iOS 7 with Android 4.4 (Kit Kat), you can see huge differences among them, but many functionalities mirror one another. So one has to wonder, if there’s such a massive gap in pricing, surely iPhones must deliver additional features? The answer is a resounding no. 

In fact, Apple is copying some things from Android. The new Apple iOS recently added some features that were around in Android for a long time, like disabling WiFi from the notification screen or the new task manager which is just an Apple version of the existing one in Android. 

Additionally, iOS 7 becomes problematic when you are using an old iPhone, like iPhone 4. Battery life lasts for a shorter time and some features are not available because the hardware is not ready for them. Some would argue this is a way to force people to buy a new phone every two years in order to be able to use the latest features.

So what about Android? They’ve added some interesting features like the new interface with a design that’s very clean and simple. They’ve incorporated some components from the flat iOS design, but it shows the elements in a clear way — not to mention the colour palette is appropriate for a device that the user is going to be looking at for a long period of time.

The question Android fans are puzzled with is why anyone would pay £500 for an iPhone when they can have a Samsung or a Motorola phone which provides the exact same functions for less than half the price of an iPhone? Sure, Apple products are beautiful and easy to use. But at the end of the day, Android gives more freedom to the user with customization capabilities. We’re going to suggest one possible answer for many Apple aficionados is in a genius marketing strategy. 

Power of Brand Awareness

The cult-like following of Apple’s products may be attributed to the hype Apple is able to generate for its consumers year after year. Nobody is able to build buzz and speculation on upcoming products and announcements like Apple. Their brand following is built on creating the ultimate user experience — from the packaging, design, to the products themselves, Apple has capitalized on fans looking to have the latest in gadgets. Just one look at the massive queues outside an Apple store during a new product launch summarizes the incredible demand these products generate.

Having all of this in mind, one must wonder the powerful effects of successful marketing efforts.  If most people aren’t moved by features or specifications, some other channels must be contributing to user preferences. Sometimes, a name seals the deal and you can see that every day in the tube or on the bus.

In a city like London, iPhones and iPads are more widely seen than Android devices. Why? That answer will vary user to user, but there’s no denying Apple’s global brand awareness and more importantly, loyalty. After all, Apple’s cool and sleek designs outsells a product that works on par and is significantly cheaper, so there is a sense of established value with the Apple community. Wherever your personal preferences lay, the war between Apple and Android continues…

We want to know: which operating system do you prefer and why? Comment below and join the debate.

Native versus Cross-Platform Mobile Development

By | Android, iOS, Mobile | One Comment

Mobile app developers are always faced with one of the most challenging decisions when building an application: should I develop native or cross platform? While there are obvious pros and cons for using either approaches, a lot of the determining factors lay in the app’s purpose and audience. Let’s examine the difference between native development and cross-platform development and the tools/frameworks used for them.

Native Development:

Native is code compiled for the specific devices using fixed development languages.

  • For iOS,  Xcode is used as the development tool and Objective C as development language.
  • For Android, Eclipse or Android Studio is the development tool and Java as development language.

Cross-Platform Development:

In cross-platform development, code is used and compiled for multiple platforms. Usually, HTML/CSS and Javascript are used as development languages.  Some solutions will compile it into native code, but they are never truly native.

  • Example Solutions: RhoMobile, Appcelerator, PhoneGap, MoSync.

Why choose native?

  1.  Better Performance: When coding with the indented programming language, you have access to the full device APIs. Though cross-platform solutions offer native APIs to use, you will have to wait until it is released in order to use it. When it comes to animations and gestures, native code will be more polished and slicker than cross-platform solutions.
  2. Better Solutions: There are some cross-platform solutions that will compile code into the native language, but none of them compile it to completely native so it becomes very hard to do the custom changes for the specific platform for the developer.  In native, there are less serious limitations between creativity and platform capabilities, which provides a developer better solution.
  3. Better Support: Developers we work with often say that they like to work in native code because it is easier to get help. They can go online to forums like Stack Overflow and quickly get answers since there are so many more people writing native code.
  4. Better Deployments: Issues with deploying  cross-platform codes are more prevalent compared to the native deployments because of its built in packages. Additionally, applications tend to suffer from real performance pains during run time.

The Verdict

When using cross-platform solutions, fragmentation is a major concern developers must overcome. The notion of a one size fits all approach to building apps is not realistic.

What do you think?  Let us know in the comments section below.

One Month Later: iOS 7.1

By | iOS, Mobile | No Comments

It has been just one month since Apple released the update to iOS 7, iOS 7.1, to the masses.  With 30 days to play with the final version, we have some observations to share about changes, features and performance.Man with iPhone

First announced as a beta back in November, many have suggested that the 7.1 update is what Apple should have released as version 7.0.  Debatable as that may be, we do understand that 7.1 came packed with many tweaks and enhancements that make the OS run more smoothly, but perhaps with some head scratching moments.

What we like

There is no denying that the operating system seems far sprightlier than it did in its first incarnation as iOS 7.  Apps seem to open more quickly and the responsiveness of them in action seems to also be enhanced.

Some of this is smoke and mirrors – there have been some changes to the actual animations that give the appearance of faster processing speeds.  But there have been some real performance upticks, and for those with older devices, like the iPhone 4/4s benefitting the most.  But even my iPhone 5 has been positively impacted.  It just feels faster – almost like a new device despite its 2012 vintage.

Those applications that have been updated with the new specs Apple has in place to mesh with the new iOS have also seen appreciable improvements.  Commonly installed apps like Twitter, Instagram and Facebook all seem to operate more smoothly.  Granted, with millions of apps out there, it would be a massive task to test them all, but the top ranked apps in the iTunes store all seem to have benefited.

What we don’t like

Those with “fat fingers” like your truly may not be so keen on the changes to the phone interface.  Especially as they have taken away the larger rectangular buttons to accept or end a call, and replaced them with much smaller circular ones.  While it might look more polished, it has done so at the expense of ease of use.  We’d ask for the option to go back to larger buttons if desired.

There was a great hope that battery life would be extended, but in random samplings of people at The App Experts, we’re not seeing an increase.  Indeed, some suggest that the battery life has been reduced.  This could be anomalous behavior and external factors could be at play, such as use patterns and recharge frequency.  But still, it doesn’t look like a positive to our iOS developers.

We’d also like to see a patch to address the distressing news that thieves can exploit a bug which disables the “find my phone” feature.  While this is a newly reported issue, it is one that we’d push to critical level if we were at Apple.  Hopefully that will be addressed in a 7.1.1 update directly.  We should also point out that this issue has a simple work around – put a passcode on your phone that can’t be guessed, and you should keep a thief from accessing your apps and settings.

Summing up

If you have yet to upgrade to iOS 7.1, it is worth doing as you will see some performance benefits.  Those with fat fingers, may wish to experience the phone app on a device that has the update, as you may grow daffy trying to hit the wee little circles.

What do you think?  Are you satisfied? What should come about in iOS 8? We’d enjoy getting your thoughts in the comment section.  Until next time, cheers!

Improve Android Emulator Performance

By | Android, Mobile | No Comments

Testing is a critical aspect when building an app because it allows you to see how users interact with your app. Android developers need to be especially careful with fragmentation concerns due to multiple OS variations. The Android Emulator is a great tool to test Android applications in a development environment.

android

While using Android virtual emulator for testing, Android developers can configure the emulator to virtually every possible device type available on the market. Developers should focus on testing some of the more popular devices to ensure the app matches to each device’s screen resolution.

DISADVANTAGES

Despite the fact that Android emulator provides tremendous options for developers to make adjustments to configuring, many developers avoid testing Android applications on emulator because of its slow loading and response time. All too often, the emulator won’t load at all to run an app.

If a developer is building an application on a low configuration machine (4 GB RAM or lower and Intel i3 or lower), then development and testing may become dreadful. Developers may witness no sign of the emulator loading and even if it gets loaded, it seemingly takes forever to launch and load the app. So what’s a developer to do?

THE ANSWER

Our Android App Experts have resisted using emulator in the past, but they’ve found an option to maximize the response time of Android virtual emulator. Here are the steps to increase the RAM size of emulator beyond the configuration limit of virtual emulator.

Note*: The steps below are configured on Windows 7 machine

Locate below folder location on your machine:
C:\Users\<username>\.android\avd\<YOUR EMULATOR>\
Open config.ini (Configuration file)
Update below attribute to 1024MB
hw.ramSize=1024MB

Have you seen an improvement in Android emulator launch time and app response time while testing app on emulator? Tell us your experiences in Android app testing in the comment section below.

The Ongoing Contest for Mobile Device Market Share Control

By | Android, iOS, Mobile | No Comments

Reports touting Apple mobile product features and functionalities seem to be everywhere these days, but it’s important to recognize that the iPad and iPhone are not the dominate devices out there in terms of market share.  That honor goes to Android.

Industry analysts at International Data Corporation report that Google’s Android now controls 80% of the market.  Also noteworthy, despite Apple’s sales volumes increasing and earning new records, iOS market share actually went down.

Equally important is the uptick with Windows Phone.  That platform saw impressive gains after the Nokia deal was announced in September. Nokia accounts for more than 90% of all the Windows Phone devices sold to date.

This isn’t to say that Apple is going the way of the dying Blackberry.  Some of the declining demand in 2013 Q3 can be attributed to the worst kept annual secret – that new iPhone and iPad devices tend to be released in the waning months of each year.  Likewise, while sales numbers are up, market share can decline due to the greater numbers of people that are adopting their first smart phone or tablet.

So how does a business best leverage mobile?  Our mobile app developers recommend developing a comprehensive mobile strategy that encompasses iOS, Android and Windows Mobile. The jury is still out on the possibility for a rebirth of RIM’s Blackberry.

Want to learn more about how your organization can benefit from mobile apps that span all of the major mobile platforms, contact the App Experts at 0208 591 9330.