Tag Archives: android

Hands on with Cordova in Visual Studio

At TechEd this week, Microsoft announced Apache Cordova support in Visual Studio 2013. A Cordova app is HTML and JavaScript wrapped as a native app, with support for multiple platforms including iOS and Android. It is the open source part of Adobe’s PhoneGap product. I downloaded the preview from here and took a quick look.

There is a long list of dependencies which the preview offers to install on your behalf:

image

and

image

The list includes the Java SDK, Google Chrome and Apple iTunes. The documentation explains that Java is required for the Android build process, Chrome is required to run the Ripple emulator (so you could choose not to install if you do not require Ripple), and iTunes is required for deploying an app to an iOS device, though a Mac is also required.

The license terms for both Chrome and iTunes are long and onerous, plus iTunes is on my list of applications not to install on Windows if you want it to run fast. Chrome is already installed on my PC, and I unchecked iTunes.

Next, I ran Visual Studio and selected a Multi-Device Hybrid App project (I guess “Cordova app” was rejected as being too short and simple).

image

An annoyance is that if you use the default project location, it is incompatible because of spaces in the path:

image

The project opened, and being impatient I immediately hit Run.

When you build, and debug using the default Ripple emulator (which runs in Chrome, hence the dependency), Visual Studio grabs a ton of dependencies.

image

and eventually the app runs:

image

or you can debug in the Android emulator:

image

A good start.

Microsoft has some sample projects for AngularJS, BackboneJS and WinJS. This last is intriguing since you could emulate the Windows Phone look and feel (or something like it) on Android on iOS, though it would look far from native.

The preview is not feature-complete. The only supported device targets are Android 4.x, IOS 6 and 7, Windows 8.x Store apps, and Windows Phone 8.x. Windows Phone debugging does not work in this preview.

Embarcadero pre-announces AppMethod cross-platform development tool: Delphi repackaged?

Embarcadero is spilling the beans on a new development tool called AppMethod, which has its own site here and a little more information on TechCrunch. A fuller reveal is promised at SXSW, which kicks off on March 7 in Austin, Texas.

image

But what is AppMethod? The IDE looks very like Delphi, the languages are Object Pascal (like Dephi) or C++ (like C++ Builder), and target platforms include Windows, Mac, iOS and Android. It would be extraordinary if the GUI framework were not some variant of FireMonkey, the cross-platform and mobile framework in Delphi.

Just Delphi (and C++ Builder, which is Delphi for C++) repackaged then? In a comment Embarcadero developer evangelist David Intersimone says that is “way off base” though the only firm fact he offers is that AppMethod is less capable than Delphi for Windows, which presumably means that Delphi’s VCL (Visual Component Library) framework for Windows applications is not included.

Lack of a feature is not a compelling reason to buy AppMethod rather than Delphi so Object Pascal enthusiasts must hope there is more good stuff to be revealed.

I looked out for the Embarcadero stand at Mobile World Congress (MWC), which was a small affair tucked away in the corner of one of the vast halls.

image

The stand was hardly bustling and was overshadowed by a larger stand next to it for another app building tool, AppMachine. While I would not read much into the size of a stand at MWC, that accords with my general sense that while the recently added cross-platform and mobile capabilities in Delphi have won some take-up, it is a small player overall. Embarcadero may feel that a new name and a bit of distance between FireMonkey/Delphi and the original Windows-only tool will help to attract new developers.

X is for Xamarin: One company that is pleased to see Nokia X

Xamarin, which provides cross-platform development tools for targeting iOS and Android wtih C#, is not exhibiting here at Mobile World Congress in Barcelona, but does have a presence for meetings, and I caught up with Joseph Hill who is Director of Developer Relations.

Xamarin has just announced a joint SDK with SAP along with some SAP-specific support in its cloud testing service; but Monday’s announcement of Nokia X, Android smartphones from soon-to-be-Microsoft Nokia, was even bigger news from Hill’s perspective.

If you are a Windows Phone developer with apps written in C#, Xamarin gives you a way to port your code to Nokia X. Apparently Nokia itself has taken advantage of this to port Nokia Mix Radio, as described by Nokia’s developers here. Nokia also used MVVM Cross in order to take cross-platform abstraction beyond what Xamarin itself gives them (Xamarin is deliberately restricted to non-visual code).

Nokia states that it will do all future development using Microsoft’s Portable Class Libraries, and is also refactoring existing code:

The final step in our journey towards the common architecture is to throw out the legacy code from the Windows Phone and Windows 8 apps so they’re stripped back to existing PCL shared assemblies and then integrate them with our fully shared codebase. Now that the Nokia X has launched that’s the next major goal we’re striving towards and work begins now.

I imagine that Xamarin could prove useful in some of Microsoft’s other internal projects as it prepares for a world in which there is an official Microsoft Android platform.

As an aside, it seems to me unlikely that Microsoft will do anything other than run with Nokia X after the acquisition. Microsoft is supporting Nokia X with Skype and OneDrive, which is an indication of its attitude.

Nokia’s puzzling Android announcement: Nokia X

Nokia has announced the X range: Android smartphones connected to Microsoft/Nokia services including Bing search, OneDrive cloud storage, Nokia Here maps, and Nokia Music.

image

The phones, according to Nokia, are aimed at the “affordable” market especially in “growth markets” or in other words, less developed territories.

image

The stated reason for Nokia X is combine the rich Android app ecosystem – apart from Google’s own apps which largely will not run because of their dependence on proprietary Google Play services – with a “feeder” for the cloud services which are shared with the Lumia range. The UI is tiled and the phones have the look and feel of cut-down Lumia more than Android. Nokia’s Stephen Elop stated that Lumia and Windows Phone remains Nokia’s primary smartphone strategy.

Note that although Nokia is being acquired by Microsoft, the deal is not complete, and Nokia’s management is equally as independent of Microsoft as it was this time last year.

Here’s the puzzle though. Elop also announced that the low-end Windows Phone, Lumia 520, outsells Android in the €75-150 price range, exactly the range also occupied by Nokia X. It is no more affordable than Windows Phone. The real rationale then is about the Android app ecosystem rather than affordability.

There are several reasons why Nokia X might not be a big hit.

First, consumers will pick up that these do not offer the same experience as mainstream Android devices running Google services. This might not matter if the Microsoft/Nokia services were superior to those from Google, but that is hard to see. Bing vs Google for search?, Nokia Music vs Google Play music? Google Now vs no equivalent? Play Store vs Nokia Store?

Second, if you want a Microsoft services device, how likely is it that the supporting apps on Android will be superior to those on Windows Phone? Take Office 365, for example. Windows Phone has better support than Android, and that is part of Microsoft’s differentiation.

If Nokia X is a worse Android than Android, and a worse Windows Phone than Windows Phone, what is the point of it and why will anyone buy?

Here is where Nokia X does make sense. It is a strong Plan B for a company that is having second thoughts about the long-term prospects of Windows Phone. Perhaps it could also replace Asha at the low end, if in time Nokia manages to drive the cost down. The Android operating system is free, if you leave out the proprietary Google bits, so there is some cost saving versus Windows Phone.

Unfortunately there is also a negative impact on Lumia, in that Nokia is seen to be wavering in its commitment to Windows Phone and distracted by supporting too many mobile operating systems. There was no Lumia announcement today at Mobile World Congress, which is odd considering that Nokia has a reasonable story to report in terms of platform growth.

CES analyst predicts flat global consumer tech sales, massive dominance of smartphones and tablets, drift towards low-end

At CES in Las Vegas yesterday, CEA Director of Industry Analysis Steve Koenig presented data and predictions on global tech spending trends. The figures come out of CEA Research and are based on sales tracking at retail outlets around the world supplemented by other data.

image

This being CES, I was expecting a certain amount of hype around how consumer technology is changing the world, but in fact Koenig’s presentation was matter-of-fact and somewhat downbeat. He said that the overall consumer tech spending trend is flat, with rising spend in emerging markets (especially China) more or less making up for declining spend in mature markets, which he says is due to market saturation. His figures show 2% growth in spending in 2013 but a 1% decline in 2014. Given the uncertainty of this kind of forecast, let’s call it flat.

The “market saturation” factor is a point to ponder. It suggests that technical devices are “good enough” for longer. It also suggests that overall the new gadgetry on show at CES is not sufficiently exciting to persuade us to spend a higher proportion of our income on consumer electronics.

Looking at his figures though, it is not just a matter of saturation. Another factor is device convergence. We are spending less on cameras and camcorders because a smartphone is good enough. We are spending less on printers because there is less need to print stuff; we can view it on a tablet. We don’t need a SatNav any more; we use a smartphone (or it is built into the car’s dashboard). In fact, we are loving our smartphones and tablets so much that spending on almost any other kind of tech is in decline. Here’s the slide showing how these mobile devices are forecast to account for 43% of consumer tech spending in 2014:

image

Spending on smartphones is forecast to increase by 9% in 2014, and on tablets 6%. Almost the only other broad category for which significant revenue growth is forecast in 2014 is video games consoles, thanks to the launch of new generation Xbox and PlayStation boxes (maybe Steam boxes too). That is a product cycle, not a long-term trend. Personally (my thoughts, not Koenig’s) I reckon games consoles will decline thanks to competition from smartphones, tablets and smart TVs. Global TV sales are expected to increase by 2% in units.

The other big picture trend identified by Koenig is the reduction in the average selling price (ASP) of smartphones and tablets. Smartphone ASP is down from $444 in 2010 to $297 in 2014.

image

This trend is partly because the quality of cheaper devices has improved, but also because the emerging markets which are spending more are also markets that want lower prices. Taken together, this translates to a significant shift towards the low end. Overall, CEA forecasts that tech spending in developing markets, primarily on low end devices, will equal tech spending in mature markets for the first time in 2014.

image

Of course this is largely an Android story. I will add though some reflections on what has happened with Windows in the light of these trends. Microsoft was right to adapt Windows for tablets, but if you look at how Windows 8 was launched there was too much focus on the high-end, trying to copy Apple rather than compete with Android. That was a mistake, and it is only recently that OEMs like Asus, with its T100 Windows 8.1 tablet, have started to come out with decent low-end devices. Nokia on the other hand has done exactly the right thing with its Lumia Windows Phones, building market share with excellent low-end smartphones. Whether that momentum will be sustained following Microsoft’s acquisition will determine the fate of the phone platform. 

Finally, note that forecasting the future is never easy and this time next year the picture may look quite different.

Update: Koenig’s slide deck is here.

Asus Transformer Book Trio combines Windows and Android – but what is it for?

Microsoft has one idea about how to combine desktop Windows with a tablet OS: mash them together into a single operating system and call it Windows 8.

Asus has another idea. Put Windows in the keyboard dock, Android in the tablet, and allow the tablet to be docket to form a Windows or Android laptop.

This is the Transformer Book Trio, just launched and on sale from 11 November 2013 at £899.99.

image

All my instincts say this a terrible idea. Let Windows be Windows and Android Android, do not try to combine them.

Trying the machine though I found it was good fun. Just press the little Android button and it switches.

image 

and it becomes an Android laptop:

image

The dock mechanism is a bit ugly but looks robust:

image

There is the question still: what will you do with the keyboard when not in use? In a home context that is not a problem, but when on the road I find the most convenient place to keep a detachable keyboard is to attach it, making it more of a laptop than a tablet in practice.

Having two computers in one gives you a few options, which I did not have time to explore in detail. As I understand it, you can share storage in order to open a document prepared in Windows on Android, for example, and with two batteries there is scope for charging one from the other.

This is two separate computers though. It should really be called Duo, but Asus calls it Trio on the grounds that you can use it as a laptop or a desktop machine, with an external display.

The PC runs an Intel Core i5 4200U, and has 4GB RAM and 500GB hard drive. The display is 1920 x 1080 and supports capacitive 10-point multi-touch. Connectivity includes 802.11ac (dual-band) wi-fi, Bluetooth 4.0, 2 USB 3.0 ports, Mini DisplayPort, and Micro-HDMI 1.4.

The tablet has an Intel Atom Z2560 with 2GB RAM and 16GB storage. Connectivity includes   802.11n (2.4GHz), Bluetooth 3.0, Micro-USB 2.0, microSD card slot.

Fun then; but what is the use case for this machine? This is where I am still having difficulty. It is somewhat expensive (though with a Core i5 performance is decent), and I have a hunch that users will end up sticking with one or the other OS most of the time – probably Windows given the price.

Oddly, it would make more sense to me to have a high-end Android device with the ability to run Windows when needed. This would address the case where a user wants to migrate to Android but occasionally needs a Windows app.

Brief hands on with new Asus Windows 8.1 T100 tablet – or should that be netbook?

Asus has launched two new tablets in the UK.

This one is the 10.1″ T100 has an Intel Atom “Bay Trail” Z3740 quad-core processor. The display is 1366 x 768 and supports capacitive multi-touch.

image

You press a release button under the display to detach it from the keyboard, whereupon it becomes a tablet. This approach, it is now generally agreed, is better than a screen which twists over, since it gives you a reasonably thin and lightweight (550g) tablet rather one that is bulky and odd to hold. However, there is still the question of what you are going to do with the keyboard once detached, and I have a suspicion that these machines are likely to be almost permanently attached to the keyboard making them similar to netbooks.

image

Microsoft’s Surface overcomes this to some extent, especially with the Touch keyboard cover that folds underneath and adds little weight or bulk.

On the other hand, the T100 strikes me as good value at £349.99 (which includes the keyboard dock), especially bearing in mind that Office Home and Student is bundled (Word, Excel, PowerPoint, but no Outlook).

The T100 comes with 2GB RAM and 32GB eMMC storage. Connectivity includes Bluetooth 4.0, Micro-USB, Micro-HDMI, MicroSD slot, and a USB 3.0 port in the docking keyboard.

I tried the T100 briefly. I was impressed with the performance; Word and Excel opened quickly and overall it feels quick and responsive. I did not like the keyboard much; it felt slightly spongy, but at this price a few weaknesses can be forgiven.

The tablet Windows key is not under the screen as with most Windows 8 tablets, but a button on the side. What looks like the Windows key in the above snap is inactive, and that logo will not show on the production units.

Embarcadero RAD Studio XE5 (Delphi) for Android now available

Today Embarcadero released RAD Studio XE5 which lets you build apps for Windows, Mac, iOS and Android. You can also buy Delphi XE5 separately if you prefer.

Embarcadero’s release cycle is relatively rapid. It was only six months ago that RAD Studio XE4 with iOS support appeared.

The big deal in this release is Android support. If you use the FireMonkey framework, you can build apps for all supported platforms.

There is also a new REST client library and some other enhancements – see here for a list of what’s new.

Embarcadero’s approach to Android development is distinctive. In keeping with Delphi’s tradition of native code compilation, Android apps are compiled using the NDK (Native Development Kit). Embarcadero’s developer evangelist John Thomas told me that this delivers excellent performance. I can believe it, though note what Google says:

Before downloading the NDK, you should understand that the NDK will not benefit most apps. As a developer, you need to balance its benefits against its drawbacks. Notably, using native code on Android generally does not result in a noticable performance improvement, but it always increases your app complexity. In general, you should only use the NDK if it is essential to your app—never because you simply prefer to program in C/C++.

Delphi developers are largely shielded from the complexity of the NDK, since you code using the high level abstraction provided by the runtime library (RTL) and the FireMonkey framework. If that is all you need I should think everything will be fine. If you have a Java library you need to call from your Delphi Android application, you need to use JNI (Java Native Interface) which is not so much fun.

Another point to note is that FireMonkey emulates most visual controls like buttons and lists, by drawing them itself. Users might not notice, if they look and behave exactly like the native controls, but this is hard to do perfectly. Embarcadero’s approach is native in respect of the code it generates, but not in respect of the controls it uses.

I installed RAD Studio XE5 on a Windows 8 machine and set about building an Android app. I already had the Android SDK installed so I asked the RAD Studio installer to skip the SDK but to install the NDK. As it turned out, I am not sure whether it did or did not (I could not find it quickly), but it was easier to download the NDK manually.

I have previously tried Delphi for iOS, for which the usual approach is to run Delphi (or RAD Studio) in a Windows emulator on a Mac, since the Delphi IDE is Windows only. This approach is not so good for Android development because its hard to attach Android devices to an emulator for debugging. Therefore, a real Windows PC is a better platform for Android development. If you want to target iOS as well, you can still do so, by using the remote agent running on a Mac.

Setting up for Android development is a little harder than setting up iOS development. The Android device I used for my test is a Sony Xperia T, and I installed the Sony PC Companion to be sure of having the correct USB drivers for debugging. With Java, the SDK, the NDK, RAD Studio itself, and getting the device connected, that is a fair number of moving parts.

It worked though. I created an Android app, connected my Xperia, and it showed up as a target in Delphi (it is also called the LT30p).

image

I threw a label, a listbox and a button onto my app’s main screen.

image

As it turned out, I should have taken a little more trouble. Here is my app running on the phone:

image

Something has gone wrong with the list, but it looks easy to fix.

According to Embarcadero, a recent survey of over 1300 Windows developers showed that 85% get requests for mobile apps. But what mobile platform is most requested? Android is apparently at the top of the list:

  • 83% Android
  • 67% iOS
  • 33% Windows Phone
  • 17% Windows RT
  • 14% Blackberry

Is that really Windows RT (ARM) or could it include WinRT (Windows 8 Store app) I wonder? Neither are supported by Delphi yet; but at least with Android it now supports the most highly requested platform.

Cross-platform mobile development is critical today, and the new capabilities in Delphi and RAD Studio will be welcome. Is it the best approach? The trade-off is this. On the plus side, you get a cross-platform GUI framework that lets you share the maximum amount of code across all the targets you support. On the minus side, that might not be a good idea; see this post for some thoughts on that. You also get a native executable that should perform well, certainly better than an HTML/JavaScript approach, though I’m not convinced that using the NDK on Android is ideal.

How big is your Delphi Android app? Using the Hello World example above, this is what I got in debug configuration:

image

24.52MB storage. I changed to release configuration and got this:

image

That saved nearly 3MB, to 21.62MB.

Here is the RAM usage:

image

I would be interested in hearing from developers using Delphi or C++ Builder for Android development. How is the quality of this first release? Is the fact that you are not developing in Java a problem in practice?